Re: Programatically activate menu like a mouse click



On 23/02/17 21:02, Colomban Wendling wrote:


Sounds odd to do that manually.  Do you know about mnemonic keys?
Basically if you mark some part of the label to be the mnemonic letter,
you'll be able to trigger that element with Alt+letter.

Additionally, F10 already pops up the first menu of the window's menubar.


I sent a reply to Eric's message with an example of what I am doing.
Whay you suggest is valid for a "window" application that has the input
focus but I am trying to write a "dock" application that isn't focussed.
Sorry I should have made that clearer.

    self.menubar1.select_item(self.menuitem1)

Thanks for that tip - I tried it and (see my other msg) it selects the
first menu item but the app doesn't respond after that.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]