<!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
<link rel=
"STYLESHEET" href=
"lib.css" type='text/css'
/>
<link rel=
"SHORTCUT ICON" href=
"../icons/pyfav.png" type=
"image/png" />
<link rel='start' href='../index.html' title='Python Documentation Index'
/>
<link rel=
"first" href=
"lib.html" title='Python Library Reference'
/>
<link rel='contents' href='contents.html'
title=
"Contents" />
<link rel='index' href='genindex.html' title='Index'
/>
<link rel='last' href='about.html' title='About this document...'
/>
<link rel='help' href='about.html' title='About this document...'
/>
<link rel=
"next" href=
"node734.html" />
<link rel=
"prev" href=
"module-Tix.html" />
<link rel=
"parent" href=
"module-Tix.html" />
<link rel=
"next" href=
"node734.html" />
<meta name='aesop' content='information'
/>
<title>16.2.1 Using Tix
</title>
<div id='top-navigation-panel' xml:id='top-navigation-panel'
>
<table align=
"center" width=
"100%" cellpadding=
"0" cellspacing=
"2">
<td class='online-navigation'
><a rel=
"prev" title=
"16.2 Tix "
href=
"module-Tix.html"><img src='../icons/previous.png'
border='
0' height='
32' alt='Previous Page' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"parent" title=
"16.2 Tix "
href=
"module-Tix.html"><img src='../icons/up.png'
border='
0' height='
32' alt='Up One Level' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"next" title=
"16.2.2 Tix Widgets"
href=
"node734.html"><img src='../icons/next.png'
border='
0' height='
32' alt='Next Page' width='
32'
/></A></td>
<td align=
"center" width=
"100%">Python Library Reference
</td>
<td class='online-navigation'
><a rel=
"contents" title=
"Table of Contents"
href=
"contents.html"><img src='../icons/contents.png'
border='
0' height='
32' alt='Contents' width='
32'
/></A></td>
<td class='online-navigation'
><a href=
"modindex.html" title=
"Module Index"><img src='../icons/modules.png'
border='
0' height='
32' alt='Module Index' width='
32'
/></a></td>
<td class='online-navigation'
><a rel=
"index" title=
"Index"
href=
"genindex.html"><img src='../icons/index.png'
border='
0' height='
32' alt='Index' width='
32'
/></A></td>
<div class='online-navigation'
>
<b class=
"navlabel">Previous:
</b>
<a class=
"sectref" rel=
"prev" href=
"module-Tix.html">16.2 Tix
</A>
<b class=
"navlabel">Up:
</b>
<a class=
"sectref" rel=
"parent" href=
"module-Tix.html">16.2 Tix
</A>
<b class=
"navlabel">Next:
</b>
<a class=
"sectref" rel=
"next" href=
"node734.html">16.2.2 Tix Widgets
</A>
<!--End of Navigation Panel-->
<H2><A NAME=
"SECTION0018210000000000000000">
<dl><dt><table cellpadding=
"0" cellspacing=
"0"><tr valign=
"baseline">
<td><nobr><b><span class=
"typelabel">class
</span> <tt id='l2h-
4843' xml:id='l2h-
4843'
class=
"class">Tix
</tt></b>(
</nobr></td>
<td><var>screenName
</var><big>[
</big><var>, baseName
</var><big>[
</big><var>, className
</var><big>]
</big><var></var><big>]
</big><var></var>)
</td></tr></table></dt>
Toplevel widget of Tix which represents mostly the main window
of an application. It has an associated Tcl interpreter.
Classes in the
<tt class=
"module"><a href=
"module-Tix.html">Tix
</a></tt> module subclasses the classes in the
<tt class=
"module"><a href=
"module-Tkinter.html">Tkinter
</a></tt> module. The former imports the latter, so to use
<tt class=
"module"><a href=
"module-Tix.html">Tix
</a></tt> with Tkinter, all you need to do is to import one
module. In general, you can just import
<tt class=
"module"><a href=
"module-Tix.html">Tix
</a></tt>, and replace
the toplevel call to
<tt class=
"class">Tkinter.Tk
</tt> with
<tt class=
"class">Tix.Tk
</tt>:
<div class=
"verbatim"><pre>
from Tkconstants import *
To use
<tt class=
"module"><a href=
"module-Tix.html">Tix
</a></tt>, you must have the
<tt class=
"module"><a href=
"module-Tix.html">Tix
</a></tt> widgets installed,
usually alongside your installation of the Tk widgets.
To test your installation, try the following:
<div class=
"verbatim"><pre>
root.tk.eval('package require Tix')
If this fails, you have a Tk installation problem which must be
resolved before proceeding. Use the environment variable
<a class=
"envvar" id='l2h-
4844' xml:id='l2h-
4844'
>TIX_LIBRARY
</a>
to point to the installed
<tt class=
"module"><a href=
"module-Tix.html">Tix
</a></tt> library directory, and
make sure you have the dynamic object library (
<span class=
"file">tix8183.dll
</span> or
<span class=
"file">libtix8183.so
</span>) in the same directory that contains your Tk
dynamic object library (
<span class=
"file">tk8183.dll
</span> or
<span class=
"file">libtk8183.so
</span>). The
directory with the dynamic object library should also have a file
called
<span class=
"file">pkgIndex.tcl
</span> (case sensitive), which contains the line:
<div class=
"verbatim"><pre>
package ifneeded Tix
8.1 [list load
"[file join $dir tix8183.dll]" Tix]
<div class='online-navigation'
>
<table align=
"center" width=
"100%" cellpadding=
"0" cellspacing=
"2">
<td class='online-navigation'
><a rel=
"prev" title=
"16.2 Tix "
href=
"module-Tix.html"><img src='../icons/previous.png'
border='
0' height='
32' alt='Previous Page' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"parent" title=
"16.2 Tix "
href=
"module-Tix.html"><img src='../icons/up.png'
border='
0' height='
32' alt='Up One Level' width='
32'
/></A></td>
<td class='online-navigation'
><a rel=
"next" title=
"16.2.2 Tix Widgets"
href=
"node734.html"><img src='../icons/next.png'
border='
0' height='
32' alt='Next Page' width='
32'
/></A></td>
<td align=
"center" width=
"100%">Python Library Reference
</td>
<td class='online-navigation'
><a rel=
"contents" title=
"Table of Contents"
href=
"contents.html"><img src='../icons/contents.png'
border='
0' height='
32' alt='Contents' width='
32'
/></A></td>
<td class='online-navigation'
><a href=
"modindex.html" title=
"Module Index"><img src='../icons/modules.png'
border='
0' height='
32' alt='Module Index' width='
32'
/></a></td>
<td class='online-navigation'
><a rel=
"index" title=
"Index"
href=
"genindex.html"><img src='../icons/index.png'
border='
0' height='
32' alt='Index' width='
32'
/></A></td>
<div class='online-navigation'
>
<b class=
"navlabel">Previous:
</b>
<a class=
"sectref" rel=
"prev" href=
"module-Tix.html">16.2 Tix
</A>
<b class=
"navlabel">Up:
</b>
<a class=
"sectref" rel=
"parent" href=
"module-Tix.html">16.2 Tix
</A>
<b class=
"navlabel">Next:
</b>
<a class=
"sectref" rel=
"next" href=
"node734.html">16.2.2 Tix Widgets
</A>
<span class=
"release-info">Release
2.4.2, documentation updated on
28 September
2005.
</span>
<!--End of Navigation Panel-->
See
<i><a href=
"about.html">About this document...
</a></i> for information on suggesting changes.