Yast UI
YMenuButton Class Reference

Button with popup menu. More...

Detailed Description

Button with popup menu.

Following widget variants exist: MenuButton

This is a widget that looks very much like a PushButton, but unlike a PushButton it doesn't immediately start some action but opens a popup menu from where the user can select an item that starts an action. Any item may in turn open a submenu etc.

UserInput() returns the ID of a menu item if one was activated. It will never return the ID of the MenuButton itself.

Style guide hint: Don't overuse this widget. Use it for dialogs that provide lots of actions. Make the most frequently used actions accessible via normal PushButtons. Move less frequently used actions (e.g. "expert" actions) into one or more MenuButtons. Don't nest the popup menus too deep - the deeper the nesting, the more awkward the user interface will be.

You can (and should) provide keybord shortcuts along with the button label as well as for any menu item.


The documentation for this class was generated from the following file: