I am working on a Gnome Panel Applet that displays a pop-up menu on clicking it’s icon. The problem is, with lots of entries, the menu does not pop up with the first items visible, but somewhere in the middle. This makes it necessary to scroll up to see the top item (a sub-menu) and the first ones under it. These are really data, not just “menu” choices in the usual sense.
Can anyone suggest a fix, other than showing fewer items?
This is on Linux.
Thanks!
5
1 Answer
would this work…?
menu.set_active(0)
3
I had looked at that, but the documentation says “This is used by the gtk.OptionMenu and is not useful for applications.” I tried it anyway, but it seems to have no effect.
–You can have the bounty since I found the answer myself and can’t get the bounty back anyways.
@personthehuman – could you please post the solution you found as a proper answer here? It will probably be useful for others.
– chrBrd
I’d suggest that you make the menu multi-level somehow when it’s too long. Searching through an overly long list is no good anyway.
Thanks, that is a good idea, but not the problem I am trying to solve. I have code in place to limit the menu to a certain number of items. What bothers me is that when it pops up, the top dub-men and items are hidden until I scroll up. In other words, the top of the menu does not initially show up. I don’t mind scrolling down if I want to see older items, but the newest item should be visible on first displaying of the menu.
meant “sub-menu”. This input box is overlapped by links on the right, making it hard to see.
This is also an issue in combo boxes and context menus and it’s driving me crazy so I’m starting a bounty.
I redact what i said about non-python answers. I thought only the accepted answer could be bountied but I just realized I could give it to any answer I want. Any language could potentially recive the bounty.