471,350 Members | 1,839 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

Problem using Tix.ComboBox

I am working on my first Python script with a UI. Was working with a ComboBox. Aftermaking some changes, unrelated to the Combo box, it now aborts. So my code is:

Expand|Select|Wrap|Line Numbers
  1. from Tix import *
  2. from tkMessageBox import *
  3. import sys
  4. import shelve
  6. class MyDbox (Frame):
  7.     def __init__ (self,parent=None):
  8.         Frame.__init__(self,parent)
  9.         self.pack (expand=YES, fill=BOTH)
  11.         projectFrame = Frame(self)
  12.         projectFrame.pack (expand=YES, fill=X)
  13.         Label (projectFrame,text='Project:').pack (side=LEFT)
  15.         projectSelect = ComboBox(projectFrame,variable=self.ProjectNameVar,dropdown=1,editable=0)
  17.         <.......>
  19. if __name__ == '__main__':
  20.    MyDbox  ().mainloop ()
and the error Active Python 2.5 gives is:

Traceback (most recent call last):
File "C:\Documents and Settings\Chris\Desktop\time\timekeeper.py", line 300, in <module>
LawTimeDbox (newdb).mainloop ()
File "C:\Documents and Settings\Chris\Desktop\time\timekeeper.py", line 202, in __init__
projectSelect = ComboBox(projectFrame,variable=self.ProjectNameVar ,dropdown=1,editable=0)
File "C:\Python25\lib\lib-tk\Tix.py", line 579, in __init__
cnf, kw)
File "C:\Python25\lib\lib-tk\Tix.py", line 307, in __init__
self.tk.call(widgetName, self._w, *extra)
TclError: invalid command name "tixComboBox"
Any ideas why this wouldhave been working but no longer does? The lines above did not change.
Nov 26 '07 #1
0 1333

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

30 posts views Thread by dbuchanan | last post: by
5 posts views Thread by Eric A. Johnson | last post: by
1 post views Thread by amber | last post: by
4 posts views Thread by JJGarcia | last post: by
3 posts views Thread by Gerrit | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.