set_menu_model


Description:

[ Version ( since = "3.6" ) ]
public void set_menu_model (MenuModel? menu_model)

Sets the MenuModel from which the popup will be constructed, or null to dissociate any existing menu model and disable the button.

Depending on the value of use_popover, either a Menu will be created with Menu.from_model, or a Popover with Popover.from_model. In either case, actions will be connected as documented for these functions.

If popup or popover are already set, those widgets are dissociated from the this, and those properties are set to null.

Parameters:

this

a MenuButton

menu_model

a MenuModel, or null to unset and disable the button




2022 vala-language.org