The GtkButton class is the class for instantiating push button widgets.
The class heirarchy
Object +---GtkWidget +---GtkContainer +---GtkButton |
The methods for the GtkButton class are documented below.
This method creates and initializes the widget.
This is a example of how to create a new push button widget.
text = 'Press me' mybutton = .GtkButton~new(text) |
The new GtkButton object.
This method retrieves the label text from the button.
This is a example of how to retrieve the label text of a button.
text = mybutton~label() |
None.
This method sets the label text of the button.
This is a example of how to set the label text of a button.
text = 'Ok' mybutton~label = text text = 'gtk-ok' /* preassigned label */ mybutton~label = text |
GTK+ provides some preassigned labels that can be used as the text of a button. They also provide a nice graphic which will also be displayed on the button. Here are some of the preassigned labels available to you.
gtk-addNote that all the preassigned labels begin with the prefix string 'gtk-'. Your own labels can use any other string that does not contain the 'gtk-' prefix.
None.