Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Help building GUI with Tix

Reply
Thread Tools

Help building GUI with Tix

 
 
infidel
Guest
Posts: n/a
 
      07-03-2007
I am trying to build a GUI using the Tix module. What I want is a
paned window with a tree in the left pane and a notebook in the right
pane. I keep getting an error that I don't understand when adding
these widgets to the panes:

PythonWin 2.5.1 (r251:54863, May 1 2007, 17:47:05) [MSC v.1310 32 bit
(Intel)] on win32.
Portions Copyright 1994-2006 Mark Hammond - see 'Help/About PythonWin'
for further copyright information.
>>> import Tix
>>> app = Tix.Tk("Demo")
>>> panes = Tix.PanedWindow(app)
>>> panes.pack(fill=Tix.BOTH, expand=True)
>>> tree = Tix.Tree(panes)
>>> panes.add(tree)

Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Program Files\Python25\lib\lib-tk\Tix.py", line 1220, in
add
self.tk.call(self._w, 'add', name, *self._options(cnf, kw))
TclError: bad window path name ".16442432..16442432"
>>>


What am I missing?

TIA

 
Reply With Quote
 
 
 
 
infidel
Guest
Posts: n/a
 
      07-03-2007
I figured it out after finding an example somewhere:

>>> import Tix
>>> app = Tix.Tk("Demo")
>>> panes = Tix.PanedWindow(app)
>>> left = panes.add('left')
>>> right = panes.add('right')
>>> tree = Tix.Tree(left)
>>> notebook = Tix.NoteBook(right)
>>> tree.pack()
>>> notebook.pack()
>>> panes.pack()
>>> app.mainloop()


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Python Tk Tix GUI documentation & builder overview and tips baloand@googlemail.com Python 2 06-06-2011 04:14 AM
Connecting Wireless Network from Building to Building Jim Wireless Networking 5 10-05-2007 03:54 PM
Firefighters at the site of WTC7 "Move away the building is going to blow up, get back the building is going to blow up." Midex Python 24 05-07-2007 04:23 AM
Wireless building-to-building 101 Tim Jacob Wireless Networking 2 02-17-2006 09:46 AM
Building to Building wireless Patriot Cisco 2 11-04-2003 05:07 PM



Advertisments