| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <link rel="STYLESHEET" href="lib.css" type='text/css' /> |
| 5 | <link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" /> |
| 6 | <link rel='start' href='../index.html' title='Python Documentation Index' /> |
| 7 | <link rel="first" href="lib.html" title='Python Library Reference' /> |
| 8 | <link rel='contents' href='contents.html' title="Contents" /> |
| 9 | <link rel='index' href='genindex.html' title='Index' /> |
| 10 | <link rel='last' href='about.html' title='About this document...' /> |
| 11 | <link rel='help' href='about.html' title='About this document...' /> |
| 12 | <link rel="prev" href="node734.html" /> |
| 13 | <link rel="parent" href="module-Tix.html" /> |
| 14 | <link rel="next" href="module-ScrolledText.html" /> |
| 15 | <meta name='aesop' content='information' /> |
| 16 | <title>16.2.3 Tix Commands</title> |
| 17 | </head> |
| 18 | <body> |
| 19 | <DIV CLASS="navigation"> |
| 20 | <div id='top-navigation-panel' xml:id='top-navigation-panel'> |
| 21 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 22 | <tr> |
| 23 | <td class='online-navigation'><a rel="prev" title="16.2.2.8 Form Geometry Manager" |
| 24 | href="node742.html"><img src='../icons/previous.png' |
| 25 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 26 | <td class='online-navigation'><a rel="parent" title="16.2 Tix " |
| 27 | href="module-Tix.html"><img src='../icons/up.png' |
| 28 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 29 | <td class='online-navigation'><a rel="next" title="16.3 ScrolledText " |
| 30 | href="module-ScrolledText.html"><img src='../icons/next.png' |
| 31 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 32 | <td align="center" width="100%">Python Library Reference</td> |
| 33 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 34 | href="contents.html"><img src='../icons/contents.png' |
| 35 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 36 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' |
| 37 | border='0' height='32' alt='Module Index' width='32' /></a></td> |
| 38 | <td class='online-navigation'><a rel="index" title="Index" |
| 39 | href="genindex.html"><img src='../icons/index.png' |
| 40 | border='0' height='32' alt='Index' width='32' /></A></td> |
| 41 | </tr></table> |
| 42 | <div class='online-navigation'> |
| 43 | <b class="navlabel">Previous:</b> |
| 44 | <a class="sectref" rel="prev" href="node742.html">16.2.2.8 Form Geometry Manager</A> |
| 45 | <b class="navlabel">Up:</b> |
| 46 | <a class="sectref" rel="parent" href="module-Tix.html">16.2 Tix </A> |
| 47 | <b class="navlabel">Next:</b> |
| 48 | <a class="sectref" rel="next" href="module-ScrolledText.html">16.3 ScrolledText </A> |
| 49 | </div> |
| 50 | <hr /></div> |
| 51 | </DIV> |
| 52 | <!--End of Navigation Panel--> |
| 53 | |
| 54 | <H2><A NAME="SECTION0018230000000000000000"> |
| 55 | 16.2.3 Tix Commands</A> |
| 56 | </H2> |
| 57 | |
| 58 | <P> |
| 59 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 60 | <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-4872' xml:id='l2h-4872' class="class">tixCommand</tt></b>(</nobr></td> |
| 61 | <td><var></var>)</td></tr></table></dt> |
| 62 | <dd> |
| 63 | The <a class="ulink" href="http://tix.sourceforge.net/dist/current/man/html/TixCmd/tix.htm" |
| 64 | >tix commands</a> |
| 65 | provide access to miscellaneous elements of <tt class="module"><a href="module-Tix.html">Tix</a></tt>'s internal |
| 66 | state and the <tt class="module"><a href="module-Tix.html">Tix</a></tt> application context. Most of the information |
| 67 | manipulated by these methods pertains to the application as a whole, |
| 68 | or to a screen or display, rather than to a particular window. |
| 69 | |
| 70 | <P> |
| 71 | To view the current settings, the common usage is: |
| 72 | <div class="verbatim"><pre> |
| 73 | import Tix |
| 74 | root = Tix.Tk() |
| 75 | print root.tix_configure() |
| 76 | </pre></div> |
| 77 | </dl> |
| 78 | |
| 79 | <P> |
| 80 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 81 | <td><nobr><b><tt id='l2h-4873' xml:id='l2h-4873' class="method">tix_configure</tt></b>(</nobr></td> |
| 82 | <td><var></var><big>[</big><var>cnf,</var><big>]</big><var> **kw</var>)</td></tr></table></dt> |
| 83 | <dd> |
| 84 | Query or modify the configuration options of the Tix application |
| 85 | context. If no option is specified, returns a dictionary all of the |
| 86 | available options. If option is specified with no value, then the |
| 87 | method returns a list describing the one named option (this list will |
| 88 | be identical to the corresponding sublist of the value returned if no |
| 89 | option is specified). If one or more option-value pairs are |
| 90 | specified, then the method modifies the given option(s) to have the |
| 91 | given value(s); in this case the method returns an empty string. |
| 92 | Option may be any of the configuration options. |
| 93 | </dl> |
| 94 | |
| 95 | <P> |
| 96 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 97 | <td><nobr><b><tt id='l2h-4874' xml:id='l2h-4874' class="method">tix_cget</tt></b>(</nobr></td> |
| 98 | <td><var>option</var>)</td></tr></table></dt> |
| 99 | <dd> |
| 100 | Returns the current value of the configuration option given by |
| 101 | <var>option</var>. Option may be any of the configuration options. |
| 102 | </dl> |
| 103 | |
| 104 | <P> |
| 105 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 106 | <td><nobr><b><tt id='l2h-4875' xml:id='l2h-4875' class="method">tix_getbitmap</tt></b>(</nobr></td> |
| 107 | <td><var>name</var>)</td></tr></table></dt> |
| 108 | <dd> |
| 109 | Locates a bitmap file of the name <code>name.xpm</code> or <code>name</code> in |
| 110 | one of the bitmap directories (see the <tt class="method">tix_addbitmapdir()</tt> |
| 111 | method). By using <tt class="method">tix_getbitmap()</tt>, you can avoid hard |
| 112 | coding the pathnames of the bitmap files in your application. When |
| 113 | successful, it returns the complete pathname of the bitmap file, |
| 114 | prefixed with the character "<tt class="samp">@</tt>". The returned value can be used to |
| 115 | configure the <code>bitmap</code> option of the Tk and Tix widgets. |
| 116 | </dl> |
| 117 | |
| 118 | <P> |
| 119 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 120 | <td><nobr><b><tt id='l2h-4876' xml:id='l2h-4876' class="method">tix_addbitmapdir</tt></b>(</nobr></td> |
| 121 | <td><var>directory</var>)</td></tr></table></dt> |
| 122 | <dd> |
| 123 | Tix maintains a list of directories under which the |
| 124 | <tt class="method">tix_getimage()</tt> and <tt class="method">tix_getbitmap()</tt> methods will |
| 125 | search for image files. The standard bitmap directory is |
| 126 | <span class="file">$TIX_LIBRARY/bitmaps</span>. The <tt class="method">tix_addbitmapdir()</tt> method |
| 127 | adds <var>directory</var> into this list. By using this method, the image |
| 128 | files of an applications can also be located using the |
| 129 | <tt class="method">tix_getimage()</tt> or <tt class="method">tix_getbitmap()</tt> method. |
| 130 | </dl> |
| 131 | |
| 132 | <P> |
| 133 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 134 | <td><nobr><b><tt id='l2h-4877' xml:id='l2h-4877' class="method">tix_filedialog</tt></b>(</nobr></td> |
| 135 | <td><var></var><big>[</big><var>dlgclass</var><big>]</big><var></var>)</td></tr></table></dt> |
| 136 | <dd> |
| 137 | Returns the file selection dialog that may be shared among different |
| 138 | calls from this application. This method will create a file selection |
| 139 | dialog widget when it is called the first time. This dialog will be |
| 140 | returned by all subsequent calls to <tt class="method">tix_filedialog()</tt>. An |
| 141 | optional dlgclass parameter can be passed as a string to specified |
| 142 | what type of file selection dialog widget is desired. Possible |
| 143 | options are <code>tix</code>, <code>FileSelectDialog</code> or |
| 144 | <code>tixExFileSelectDialog</code>. |
| 145 | </dl> |
| 146 | |
| 147 | <P> |
| 148 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 149 | <td><nobr><b><tt id='l2h-4878' xml:id='l2h-4878' class="method">tix_getimage</tt></b>(</nobr></td> |
| 150 | <td><var>self, name</var>)</td></tr></table></dt> |
| 151 | <dd> |
| 152 | Locates an image file of the name <span class="file">name.xpm</span>, <span class="file">name.xbm</span> or |
| 153 | <span class="file">name.ppm</span> in one of the bitmap directories (see the |
| 154 | <tt class="method">tix_addbitmapdir()</tt> method above). If more than one file with |
| 155 | the same name (but different extensions) exist, then the image type is |
| 156 | chosen according to the depth of the X display: xbm images are chosen |
| 157 | on monochrome displays and color images are chosen on color |
| 158 | displays. By using <tt class="method">tix_getimage()</tt>, you can avoid hard coding |
| 159 | the pathnames of the image files in your application. When successful, |
| 160 | this method returns the name of the newly created image, which can be |
| 161 | used to configure the <code>image</code> option of the Tk and Tix widgets. |
| 162 | </dl> |
| 163 | |
| 164 | <P> |
| 165 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 166 | <td><nobr><b><tt id='l2h-4879' xml:id='l2h-4879' class="method">tix_option_get</tt></b>(</nobr></td> |
| 167 | <td><var>name</var>)</td></tr></table></dt> |
| 168 | <dd> |
| 169 | Gets the options maintained by the Tix scheme mechanism. |
| 170 | </dl> |
| 171 | |
| 172 | <P> |
| 173 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 174 | <td><nobr><b><tt id='l2h-4880' xml:id='l2h-4880' class="method">tix_resetoptions</tt></b>(</nobr></td> |
| 175 | <td><var>newScheme, newFontSet</var><big>[</big><var>, |
| 176 | newScmPrio</var><big>]</big><var></var>)</td></tr></table></dt> |
| 177 | <dd> |
| 178 | Resets the scheme and fontset of the Tix application to |
| 179 | <var>newScheme</var> and <var>newFontSet</var>, respectively. This affects only |
| 180 | those widgets created after this call. Therefore, it is best to call |
| 181 | the resetoptions method before the creation of any widgets in a Tix |
| 182 | application. |
| 183 | |
| 184 | <P> |
| 185 | The optional parameter <var>newScmPrio</var> can be given to reset the |
| 186 | priority level of the Tk options set by the Tix schemes. |
| 187 | |
| 188 | <P> |
| 189 | Because of the way Tk handles the X option database, after Tix has |
| 190 | been has imported and inited, it is not possible to reset the color |
| 191 | schemes and font sets using the <tt class="method">tix_config()</tt> method. |
| 192 | Instead, the <tt class="method">tix_resetoptions()</tt> method must be used. |
| 193 | </dl> |
| 194 | |
| 195 | <P> |
| 196 | |
| 197 | <DIV CLASS="navigation"> |
| 198 | <div class='online-navigation'> |
| 199 | <p></p><hr /> |
| 200 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 201 | <tr> |
| 202 | <td class='online-navigation'><a rel="prev" title="16.2.2.8 Form Geometry Manager" |
| 203 | href="node742.html"><img src='../icons/previous.png' |
| 204 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 205 | <td class='online-navigation'><a rel="parent" title="16.2 Tix " |
| 206 | href="module-Tix.html"><img src='../icons/up.png' |
| 207 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 208 | <td class='online-navigation'><a rel="next" title="16.3 ScrolledText " |
| 209 | href="module-ScrolledText.html"><img src='../icons/next.png' |
| 210 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 211 | <td align="center" width="100%">Python Library Reference</td> |
| 212 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 213 | href="contents.html"><img src='../icons/contents.png' |
| 214 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 215 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' |
| 216 | border='0' height='32' alt='Module Index' width='32' /></a></td> |
| 217 | <td class='online-navigation'><a rel="index" title="Index" |
| 218 | href="genindex.html"><img src='../icons/index.png' |
| 219 | border='0' height='32' alt='Index' width='32' /></A></td> |
| 220 | </tr></table> |
| 221 | <div class='online-navigation'> |
| 222 | <b class="navlabel">Previous:</b> |
| 223 | <a class="sectref" rel="prev" href="node742.html">16.2.2.8 Form Geometry Manager</A> |
| 224 | <b class="navlabel">Up:</b> |
| 225 | <a class="sectref" rel="parent" href="module-Tix.html">16.2 Tix </A> |
| 226 | <b class="navlabel">Next:</b> |
| 227 | <a class="sectref" rel="next" href="module-ScrolledText.html">16.3 ScrolledText </A> |
| 228 | </div> |
| 229 | </div> |
| 230 | <hr /> |
| 231 | <span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span> |
| 232 | </DIV> |
| 233 | <!--End of Navigation Panel--> |
| 234 | <ADDRESS> |
| 235 | See <i><a href="about.html">About this document...</a></i> for information on suggesting changes. |
| 236 | </ADDRESS> |
| 237 | </BODY> |
| 238 | </HTML> |