tkinter puzzler

Paul Rubin http
Sat May 14 16:36:12 EDT 2005


Martin Franklin <mfranklin1 at gatwick.westerngeco.slb.com> writes:
> I suspect you need to look at the columnconfigure / rowconfigure methods
> of the container (toplevel or frame)

Thanks, columnconfigure turned out to be the answer and Peter Otten's
post showing how to use it was very informative.  For some reason
columnconfigure is not documented in the otherwise excellent tkinter
reference manual from New Mexico Tech.

I'm having sort of a different prob now, which is I want to make a
pulldown menu as commonly seen on web pages.  The NMT reference
suggests using the MenuButton widget, which sort of works, though the
entrycget and entryconfigure methods that are supposedly on the menu
items aren't really there.  The toolkit itself says that MenuButton is
now considered obsolete and Frederik Lundh's manual seems to say
to use Menu somehow instead, but I haven't quite figured out how.

Is there a preferred and normal way to do this?  One thing I need is
to be able to disable individual menu choices based on stuff happening
in the application, which is why I wanted to use entryconfigure.

Also, I don't see how to get the little horizontal bar marker on the
button (as seen in IDLE) indicating that the button is a pulldown.  A
minute examining the IDLE source code didn't show it either, though I
can probably find it there with more effort.

Thanks as usual.



More information about the Python-list mailing list