I don't know if this is because of Tkinter (ie Tk) itself or the
Windows default way of handling things, but when I create a very long
menu (my test is shown below), the way it displays is rather sucky; the
menu stretches from the top of the moniter's window to the bottom (no
matter the size of the actual application).
Is there any alternative format for how a long menu gets displayed? It
would be nice if say, I could make the menu only go to the borders of
the application itself (in this case, not that long).
As for why I'm creating such a long menu, think browser bookmarks
(That's not actually what I'm doing, but similar).
=============== =============== ==
# menu-example-5.py
from Tkinter import *
root = Tk()
menubar = Menu(root)
menu = Menu(menubar, tearoff=0)
for i in xrange(100):
menu.add_comman d(label=str(i), command=root.qu it)
menu.add_comman d(label="Exit", command=root.qu it)
menubar.add_cas cade(label="Tes t", menu=menu)
root.config(men u=menubar)
mainloop()
=============== =============== ==
Windows default way of handling things, but when I create a very long
menu (my test is shown below), the way it displays is rather sucky; the
menu stretches from the top of the moniter's window to the bottom (no
matter the size of the actual application).
Is there any alternative format for how a long menu gets displayed? It
would be nice if say, I could make the menu only go to the borders of
the application itself (in this case, not that long).
As for why I'm creating such a long menu, think browser bookmarks
(That's not actually what I'm doing, but similar).
=============== =============== ==
# menu-example-5.py
from Tkinter import *
root = Tk()
menubar = Menu(root)
menu = Menu(menubar, tearoff=0)
for i in xrange(100):
menu.add_comman d(label=str(i), command=root.qu it)
menu.add_comman d(label="Exit", command=root.qu it)
menubar.add_cas cade(label="Tes t", menu=menu)
root.config(men u=menubar)
mainloop()
=============== =============== ==
Comment