Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v8plus / html / python / lib / node733.html
CommitLineData
920dae64
AT
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="next" href="node734.html" />
13<link rel="prev" href="module-Tix.html" />
14<link rel="parent" href="module-Tix.html" />
15<link rel="next" href="node734.html" />
16<meta name='aesop' content='information' />
17<title>16.2.1 Using Tix</title>
18</head>
19<body>
20<DIV CLASS="navigation">
21<div id='top-navigation-panel' xml:id='top-navigation-panel'>
22<table align="center" width="100%" cellpadding="0" cellspacing="2">
23<tr>
24<td class='online-navigation'><a rel="prev" title="16.2 Tix "
25 href="module-Tix.html"><img src='../icons/previous.png'
26 border='0' height='32' alt='Previous Page' width='32' /></A></td>
27<td class='online-navigation'><a rel="parent" title="16.2 Tix "
28 href="module-Tix.html"><img src='../icons/up.png'
29 border='0' height='32' alt='Up One Level' width='32' /></A></td>
30<td class='online-navigation'><a rel="next" title="16.2.2 Tix Widgets"
31 href="node734.html"><img src='../icons/next.png'
32 border='0' height='32' alt='Next Page' width='32' /></A></td>
33<td align="center" width="100%">Python Library Reference</td>
34<td class='online-navigation'><a rel="contents" title="Table of Contents"
35 href="contents.html"><img src='../icons/contents.png'
36 border='0' height='32' alt='Contents' width='32' /></A></td>
37<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
38 border='0' height='32' alt='Module Index' width='32' /></a></td>
39<td class='online-navigation'><a rel="index" title="Index"
40 href="genindex.html"><img src='../icons/index.png'
41 border='0' height='32' alt='Index' width='32' /></A></td>
42</tr></table>
43<div class='online-navigation'>
44<b class="navlabel">Previous:</b>
45<a class="sectref" rel="prev" href="module-Tix.html">16.2 Tix </A>
46<b class="navlabel">Up:</b>
47<a class="sectref" rel="parent" href="module-Tix.html">16.2 Tix </A>
48<b class="navlabel">Next:</b>
49<a class="sectref" rel="next" href="node734.html">16.2.2 Tix Widgets</A>
50</div>
51<hr /></div>
52</DIV>
53<!--End of Navigation Panel-->
54
55<H2><A NAME="SECTION0018210000000000000000">
5616.2.1 Using Tix</A>
57</H2>
58
59<P>
60<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
61 <td><nobr><b><span class="typelabel">class</span>&nbsp;<tt id='l2h-4843' xml:id='l2h-4843' class="class">Tix</tt></b>(</nobr></td>
62 <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>
63<dd>
64 Toplevel widget of Tix which represents mostly the main window
65 of an application. It has an associated Tcl interpreter.
66
67<P>
68Classes in the <tt class="module"><a href="module-Tix.html">Tix</a></tt> module subclasses the classes in the
69<tt class="module"><a href="module-Tkinter.html">Tkinter</a></tt> module. The former imports the latter, so to use
70<tt class="module"><a href="module-Tix.html">Tix</a></tt> with Tkinter, all you need to do is to import one
71module. In general, you can just import <tt class="module"><a href="module-Tix.html">Tix</a></tt>, and replace
72the toplevel call to <tt class="class">Tkinter.Tk</tt> with <tt class="class">Tix.Tk</tt>:
73<div class="verbatim"><pre>
74import Tix
75from Tkconstants import *
76root = Tix.Tk()
77</pre></div>
78</dl>
79
80<P>
81To 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,
82usually alongside your installation of the Tk widgets.
83To test your installation, try the following:
84<div class="verbatim"><pre>
85import Tix
86root = Tix.Tk()
87root.tk.eval('package require Tix')
88</pre></div>
89
90<P>
91If this fails, you have a Tk installation problem which must be
92resolved before proceeding. Use the environment variable <a class="envvar" id='l2h-4844' xml:id='l2h-4844'>TIX_LIBRARY</a>
93to point to the installed <tt class="module"><a href="module-Tix.html">Tix</a></tt> library directory, and
94make sure you have the dynamic object library (<span class="file">tix8183.dll</span> or
95<span class="file">libtix8183.so</span>) in the same directory that contains your Tk
96dynamic object library (<span class="file">tk8183.dll</span> or <span class="file">libtk8183.so</span>). The
97directory with the dynamic object library should also have a file
98called <span class="file">pkgIndex.tcl</span> (case sensitive), which contains the line:
99
100<P>
101<div class="verbatim"><pre>
102package ifneeded Tix 8.1 [list load "[file join $dir tix8183.dll]" Tix]
103</pre></div>
104<P>
105
106<DIV CLASS="navigation">
107<div class='online-navigation'>
108<p></p><hr />
109<table align="center" width="100%" cellpadding="0" cellspacing="2">
110<tr>
111<td class='online-navigation'><a rel="prev" title="16.2 Tix "
112 href="module-Tix.html"><img src='../icons/previous.png'
113 border='0' height='32' alt='Previous Page' width='32' /></A></td>
114<td class='online-navigation'><a rel="parent" title="16.2 Tix "
115 href="module-Tix.html"><img src='../icons/up.png'
116 border='0' height='32' alt='Up One Level' width='32' /></A></td>
117<td class='online-navigation'><a rel="next" title="16.2.2 Tix Widgets"
118 href="node734.html"><img src='../icons/next.png'
119 border='0' height='32' alt='Next Page' width='32' /></A></td>
120<td align="center" width="100%">Python Library Reference</td>
121<td class='online-navigation'><a rel="contents" title="Table of Contents"
122 href="contents.html"><img src='../icons/contents.png'
123 border='0' height='32' alt='Contents' width='32' /></A></td>
124<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
125 border='0' height='32' alt='Module Index' width='32' /></a></td>
126<td class='online-navigation'><a rel="index" title="Index"
127 href="genindex.html"><img src='../icons/index.png'
128 border='0' height='32' alt='Index' width='32' /></A></td>
129</tr></table>
130<div class='online-navigation'>
131<b class="navlabel">Previous:</b>
132<a class="sectref" rel="prev" href="module-Tix.html">16.2 Tix </A>
133<b class="navlabel">Up:</b>
134<a class="sectref" rel="parent" href="module-Tix.html">16.2 Tix </A>
135<b class="navlabel">Next:</b>
136<a class="sectref" rel="next" href="node734.html">16.2.2 Tix Widgets</A>
137</div>
138</div>
139<hr />
140<span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span>
141</DIV>
142<!--End of Navigation Panel-->
143<ADDRESS>
144See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
145</ADDRESS>
146</BODY>
147</HTML>