Button is the standard themed button. It can contain text and an icon, and it will display them according to the current Theme.
Example of creating a button and assigning an action when pressed by code:
See also BaseButton which contains common properties and methods associated with this node.
Text alignment policy for the button's text, use one of the HorizontalAlignment constants.
When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text.
When enabled, the button's icon will expand/shrink to fit the button's size while keeping its aspect. See also icon_max_width.
Flat buttons don't display decoration.
Button's icon, if text is present the icon will be placed before the text.
To edit margin and spacing of the icon, use h_separation theme property and content_margin_*
properties of the used StyleBoxes.
Specifies if the icon should be aligned horizontally to the left, right, or center of a button. Uses the same HorizontalAlignment constants as the text alignment. If centered horizontally and vertically, text will draw on top of the icon.
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
The button's text that will be displayed inside the button's area.
Base text writing direction.
Sets the clipping behavior when the text exceeds the node's bounding rectangle. See OverrunBehavior for a description of all modes.
Specifies if the icon should be aligned vertically to the top, bottom, or center of a button. Uses the same VerticalAlignment constants as the text alignment. If centered horizontally and vertically, text will draw on top of the icon.