GtkCheckbutton Class

The GtkCheckbutton class is the class for instantiating check button widgets.

The class heirarchy


   Object
      +---GtkWidget
            +---GtkContainer
               +---GtkButton
                  +---GtkCheckbutton

The methods for the GtkCheckbutton class are documented below.

GtkCheckbutton Method Table of Contents

new - Create and initialize the widget
state - Get the state of a button
state = - Set the state of a button


Method: new

This method creates and initializes the widget.

Example

This is a example of how to create a check button widget.


text = 'My Title'
mychkbutton = .GtkCheckButton~new(text)

Method Parameters

text
(Optional) The label text for the check button.

Method Results

The new GtkCheckButton object.




Method: state

This method retrieves the checked/set state from the button.

Example

This is a example of how to retrieve the state of a button.


state = mycheckbutton~state()
/* state will be .true or .false */

Method Parameters

None.

Method Results

state
Either 1 (.true) or 0 (.false) indicating the checked state.



Method: state =

This method sets the checked/set state of the button.

Example

This is a example of how to set the state of a button.


mycheckbutton~state = .true  /* check the button */

mycheckbutton~state = .false /* uncheck the button */

Method Parameters

state
Either 1 (.true) to check the button or 0 (.false) to uncheck it.

Method Results

None.




Valid XHTML 1.0!