By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,270 Members | 1,703 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,270 IT Pros & Developers. It's quick & easy.

Problem using Tix.ComboBox

P: 92
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
  5.  
  6. class MyDbox (Frame):
  7.     def __init__ (self,parent=None):
  8.         Frame.__init__(self,parent)
  9.         self.pack (expand=YES, fill=BOTH)
  10.  
  11.         projectFrame = Frame(self)
  12.         projectFrame.pack (expand=YES, fill=X)
  13.         Label (projectFrame,text='Project:').pack (side=LEFT)
  14.  
  15.         projectSelect = ComboBox(projectFrame,variable=self.ProjectNameVar,dropdown=1,editable=0)
  16.  
  17.         <.......>
  18.  
  19. if __name__ == '__main__':
  20.    MyDbox  ().mainloop ()
  21.  
  22.  
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
Share this question for a faster answer!
Share on Google+

Post your reply

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