
A pushbutton widget that issues a signal when clicked.
The GtkButton widget is usually displayed as a pushbutton with a text label GtkLabel though it can contain any valid widget. The GtkButton is generally used to attach a callback function or method that is called when the button is clicked.
-- Creates a new button widget.GtkButton::new_from_stock (string stock_id);-- Creates a new Button from stock.GtkButton::new_with_mnemonic (string label);--
clicked() The clicked() method emits the "clicked" signal to the button. enter() The enter() method emits the "enter" signal to the button. get_alignment() Returns the xalign and the yalign. get_focus_on_click() Returns the value of the "focus-on-click" property. get_image() get_label() Retrieves the text from the label of the button. get_relief() Retrieves the current relief style. get_use_stock() Returns the value of the "use_stock" property. get_use_underline() Returns whether the "use_underline" property. leave() The leave() method emits the "leave" signal to the button. pressed() The pressed method emits the "pressed" signal to the button. released() The released() method emits the "released" signal to the button. set_alignment() Sets the "xalign" and "yalign" properties. set_focus_on_click() Sets the "focus-on-click" property. set_image() set_label() Sets the text of the button label to label set_relief() Sets the relief style of the edges of the button. set_use_stock() Sets the "use_stock" property to the value of use_stock. set_use_underline() Sets the "use_underline" property to the value of use_underline.
"activate" For a button it causes the "clicked" signal to be emitted. "clicked" The "clicked" signal is emitted when the mouse button is pressed and released while the pointer is over the button. "enter" The "enter" signal is emitted when the pointer enters the button. "leave" The "leave" signal is emitted when the pointer leaves the button. "pressed" The "pressed" signal is emitted when the mouse button is pressed while the pointer is over the button. "released" The "released" signal is emitted when the button is released no matter where the pointer is.