MenuButton.setCreatePopupFunc

void setCreatePopupFunc(gtk.types.MenuButtonCreatePopupFunc func = null)

Sets func to be called when a popup is about to be shown.

func should use one of

  • [gtk.menu_button.MenuButton.setPopover]
  • [gtk.menu_button.MenuButton.setMenuModel]

to set a popup for menu_button. If func is non-null, menu_button will always be sensitive.

Using this function will not reset the menu widget attached to menu_button. Instead, this can be done manually in func.

Parameters

funcfunction to call when a popup is about to be shown, but none has been provided via other means, or null to reset to default behavior.