Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 44b6f84

Browse files
committed
More information about Tix support, contributed by Mike Clarkson.
1 parent 6995bb6 commit 44b6f84

1 file changed

Lines changed: 101 additions & 0 deletions

File tree

Doc/lib/tkinter.tex

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,6 +1403,107 @@ \subsubsection{Form Geometry Manager}
14031403
%\end{figure}
14041404
%end{latexonly}
14051405

1406+
\subsection{Tix Commands}
1407+
1408+
\begin{classdesc}{tixCommand}{}
1409+
The \ulink{tix commands}
1410+
{http://tix.sourceforge.net/dist/current/man/html/TixCmd/tix.htm}
1411+
provide access to miscellaneous elements of \refmodule{Tix}'s internal
1412+
state and the \refmodule{Tix} application context. Most of the information
1413+
manipulated by these methods pertains to the application as a whole,
1414+
or to a screen or display, rather than to a particular window.
1415+
1416+
To view the current settings, the common usage is:
1417+
\begin{verbatim}
1418+
import Tix
1419+
root = Tix.Tk()
1420+
print root.tix_configure()
1421+
\end{verbatim}
1422+
\end{classdesc}
1423+
1424+
\begin{methoddesc}{tix_configure}{\optional{cnf,} **kw}
1425+
Query or modify the configuration options of the Tix application
1426+
context. If no option is specified, returns a dictionary all of the
1427+
available options. If option is specified with no value, then the
1428+
method returns a list describing the one named option (this list will
1429+
be identical to the corresponding sublist of the value returned if no
1430+
option is specified). If one or more option-value pairs are
1431+
specified, then the method modifies the given option(s) to have the
1432+
given value(s); in this case the method returns an empty string.
1433+
Option may be any of the configuration options.
1434+
\end{methoddesc}
1435+
1436+
\begin{methoddesc}{tix_cget}{option}
1437+
Returns the current value of the configuration option given by
1438+
\var{option}. Option may be any of the configuration options.
1439+
\end{methoddesc}
1440+
1441+
\begin{methoddesc}{tix_getbitmap}{name}
1442+
Locates a bitmap file of the name \code{name.xpm} or \code{name} in
1443+
one of the bitmap directories (see the \method{tix_addbitmapdir()}
1444+
method). By using \method{tix_getbitmap()}, you can avoid hard
1445+
coding the pathnames of the bitmap files in your application. When
1446+
successful, it returns the complete pathname of the bitmap file,
1447+
prefixed with the character \samp{@}. The returned value can be used to
1448+
configure the \code{bitmap} option of the Tk and Tix widgets.
1449+
\end{methoddesc}
1450+
1451+
\begin{methoddesc}{tix_addbitmapdir}{directory}
1452+
Tix maintains a list of directories under which the
1453+
\method{tix_getimage()} and \method{tix_getbitmap()} methods will
1454+
search for image files. The standard bitmap directory is
1455+
\file{\$TIX_LIBRARY/bitmaps}. The \method{tix_addbitmapdir()} method
1456+
adds \var{directory} into this list. By using this method, the image
1457+
files of an applications can also be located using the
1458+
\method{tix_getimage()} or \method{tix_getbitmap()} method.
1459+
\end{methoddesc}
1460+
1461+
\begin{methoddesc}{tix_filedialog}{\optional{dlgclass}}
1462+
Returns the file selection dialog that may be shared among different
1463+
calls from this application. This method will create a file selection
1464+
dialog widget when it is called the first time. This dialog will be
1465+
returned by all subsequent calls to \method{tix_filedialog()}. An
1466+
optional dlgclass parameter can be passed as a string to specified
1467+
what type of file selection dialog widget is desired. Possible
1468+
options are \code{tix}, \code{FileSelectDialog} or
1469+
\code{tixExFileSelectDialog}.
1470+
\end{methoddesc}
1471+
1472+
1473+
\begin{methoddesc}{tix_getimage}{self, name}
1474+
Locates an image file of the name \file{name.xpm}, \file{name.xbm} or
1475+
\file{name.ppm} in one of the bitmap directories (see the
1476+
\method{tix_addbitmapdir()} method above). If more than one file with
1477+
the same name (but different extensions) exist, then the image type is
1478+
chosen according to the depth of the X display: xbm images are chosen
1479+
on monochrome displays and color images are chosen on color
1480+
displays. By using \method{tix_getimage()}, you can avoid hard coding
1481+
the pathnames of the image files in your application. When successful,
1482+
this method returns the name of the newly created image, which can be
1483+
used to configure the \code{image} option of the Tk and Tix widgets.
1484+
\end{methoddesc}
1485+
1486+
\begin{methoddesc}{tix_option_get}{name}
1487+
Gets the options manitained by the Tix scheme mechanism.
1488+
\end{methoddesc}
1489+
1490+
\begin{methoddesc}{tix_resetoptions}{newScheme, newFontSet\optional{,
1491+
newScmPrio}}
1492+
Resets the scheme and fontset of the Tix application to
1493+
\var{newScheme} and \var{newFontSet}, respectively. This affects only
1494+
those widgets created after this call. Therefore, it is best to call
1495+
the resetoptions method before the creation of any widgets in a Tix
1496+
application.
1497+
1498+
The optional parameter \var{newScmPrio} can be given to reset the
1499+
priority level of the Tk options set by the Tix schemes.
1500+
1501+
Because of the way Tk handles the X option database, after Tix has
1502+
been has imported and inited, it is not possible to reset the color
1503+
schemes and font sets using the \method{tix_config()} method.
1504+
Instead, the \method{tix_resetoptions()} method must be used.
1505+
\end{methoddesc}
1506+
14061507

14071508
\input{libturtle}
14081509

0 commit comments

Comments
 (0)