Chapter 11. Check Buttons

Inheritance Hierarchy

Object
   +--- Widget
         +--- Container
               +--- Bin
                     +--- Button
                           +--- ToggleButton
                                 +--- CheckButton
         

Check buttons inherit many properties and functions from toggle buttons, but look a little different. Rather than being buttons with text inside them, they are small squares with the text to the right of them. These are often used for toggling options on and off in applications.

The two creation functions are similar to those of the normal button:

new Gtk::CheckButton();

new Gtk::CheckButton( $label );

Having a string as an argument creates a check button with a label beside it.

Checking the state of the check button is identical to that of the toggle button.