MenuButton
A button, which displays items in a PopupMenu when clicked. On the right hand side there is an arrow (though it could be styled differently), to differentiate it from a regular Button.
NOTE, this is very similar to Menu, but Menus only live within MenuBars, and do not look like a Button, and have no arrow.
Theme DSL
"menu_button" {
child( ".arrow" ) { // An ImageView
image( image : Image )
image( images : NamedImages, imageName : String )
tint( tint : Color )
}
}
MenuButton inherits all the features of ButtonBase.
Properties
Functions
Each subclass of node can determine its preferred height. As most nodes are composed of smaller nodes, this is typically calculated using evalPrefWidth of the child nodes, with extra added for spacing, padding and borders.
Each subclass of node can determine its preferred width. As most nodes are composed of smaller nodes, this is typically calculated using evalPrefWidth of the child nodes, with extra added for spacing, padding and borders.
Add an event handler which is performed after the button is clicked, but before the popup menu is built.