Megawidget Syntax (Tix)

Al in Dallas alfargnoli at yahoo.com
Mon Jul 31 14:10:55 EDT 2006


I'm new to Python*. I am having trouble with the Tix NoteBook
megawidget. When I use a simpler megawidget, such as a ButtonBox, I can
add buttons by invoking

<nameOfButtonBox>.add ('button3', text='Retry')

Unfortunately, with the Notebook, I need access to a subwidget, and all
my attempts have led to error messages. When I try to look up the
megawidget documentation, I can only find example in Tcl, so I'm
confident that if someone explains the syntax of the TixNoteBook
megawidget to me, I should be able to figure it out for all the other
megawidgets on my own. Here's an attempt to add something to the hlist
subwidget:

>>> lnotebook.hlist.add ('wrongsyntax')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "C:\Python24\lib\lib-tk\Tix.py", line 863, in add
    return self.tk.call(self._w, 'add', entry, *self._options(cnf, kw))
_tkinter.TclError: invalid command name
".12204992.pane.p1.shlist.f1.hlist"

*I evaluated it many years ago (1996) when the only other choices
seemed to be Perl, Tcl, and VB. Unfortunately, my various employers
chose which scripting language would be used, and none of them ever
chose Python. Oddly, I ended up using all of the others.




More information about the Python-list mailing list