Superclass: bin atk-implementor-iface activatable buildable
Subclasses: scale-button link-button font-button color-button toggle-button
The button widget is generally used to attach a function to that is called when the button is pressed. The various signals and how to use them are outlined below.
The button widget can hold any valid child widget. That is it can hold most any other standard widget. The most commonly used child is the label.
Slots:
boolean
. Accessor: button-focus-on-click
.
Whether the button grabs focus when it is clicked with the mouse.
Default value: True
button-image
.
Child widget to appear next to the button text.
button-image-position
.
The position of the image relative to the text inside the button.
Default value: :left
string
. Accessor: button-label
.
Text of the label widget inside the button, if the button contains a label widget.
Default value: NIL
button-relief
.
The border relief style.
Default value: :normal
boolean
. Accessor: button-use-stock
.
If set, the label is used to pick a stock item instead of being displayed.
Default value: False
boolean
. Accessor: button-use-underline
.
If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.
Default value: False
single-float
. Accessor: button-xalign
.
If the child of the button is a misc or alignment, this property can be used to control it's horizontal alignment. 0.0 is left aligned, 1.0 is right aligned.
Allowed values: [0,1]
Default value: 0.5
single-float
. Accessor: button-yalign
.
If the child of the button is a misc or alignment, this property can be used to control it's vertical alignment. 0.0 is left aligned, 1.0 is right aligned.
Allowed values: [0,1]
Default value: 0.5
Signals:
This signal is an action signal and emitting it causes the button to animate press then release. Applications should never connect to this signal, but use the button::clicked signal.
Emitted when the button has been activated (pressed and released).
Emitted when the pointer enters the button.
Emitted when the pointer leaves the button.
Emitted when the button is pressed.
Emitted when the button is released.