Tkinter OptionMenu: width of items in menu

M

mariox19

Hello,

The Tkinter OptionMenu widget has me a bit confused. I have set up an
OptionMenu to expand along the X axis as the window expands. What I
find though is that the width of the submenu displaying the list of
items in the menu does not expand.

This is the object I'm talking about:

<code>

popup = OptionMenu(master, StringVar(), "")
theObjectIAmTalkingAbout = popup["menu"]

</code>

When I click on the OptionMenu, I notice that the list of items is only
about as wide as the longest word in the list, even if the OptionMenu
width extends for the entire width of the screen. This not only looks
funny, but interferes with usability. (If you click on the right side
of the OptionMenu, you have to move the mouse over to the left to
highlight one of the choices in the list.)

Am I missing something? Does anyone know how to get the submenu (the
list) of an OptionMenu to expand as well? Thanks!

Mario
 

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,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top