Megawidget Syntax (Tix)

A

Al in Dallas

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:
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.
 
A

Al in Dallas

Al said:
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:

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.

Well, I've found a partial answer for a slightly less complicated
megawidget:
[<Tix.TixSubWidget instance at 0x00BAB940>, <Tix.TixSubWidget instance
at 0x00BA
BDF0>]{'nbframe': <Tix.TixSubWidget instance at 0x00BABC38>, 'second':
<Tix.TixSubWidg
et instance at 0x00BABDF0>, 'first': <Tix.TixSubWidget instance at
0x00BAB940>}
I still don't have ListNoteBook widgets sussed, but I'm on the road.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,940
Messages
2,570,109
Members
46,576
Latest member
TuyetArreo

Latest Threads

Top