Tkinter long menu problem

Randall Hopper aa8vb at yahoo.com
Fri Mar 17 07:08:23 EST 2000


Gabor Papp:
 |Gabor Papp:
 | |I'm building a Menu with a lot of cascades and Tkinter allows this
 | |huge list to be bigger than the actual vertical screen size. Are
 | |there any options to force it to generate a new cascade for the
 | |rest of the menu in this case?
 |
 |Anyway, we figured out the solution. It's option columnbreak, when this
 |option is set to 1 at a menu item, tk breaks the menu.

That's good to know.  Thanks for mentioning it.  It still isn't a very
general solution however.  The app developer still has to do font
arithmetic to determine how many commands Tk can fit vertically on the
screen, and all the options still need to all fit on the surface area of
the screen.

I think a better solution is a scrollable pull-down such as Pmw's ComboBox.
I've used it before with good success:

    combobox = Pmw.ComboBox( parent, label_text = 'Map:', labelpos = 'w',
                             entry_state = 'disabled',
                             selectioncommand = self.__MapSelectCB,
                             scrolledlist_items = strings )

-- 
Randall Hopper
aa8vb at yahoo.com




More information about the Python-list mailing list