gtk.CheckMenuItema menu item with a check box.Synopsisgtk.CheckMenuItemgtk.MenuItemgtk.CheckMenuItemlabelNoneuse_underlineTrueset_activeis_activeget_activetoggledset_inconsistentsettingget_inconsistentset_draw_as_radiodraw_as_radioget_draw_as_radioAncestry+-- gobject.GObject
+-- gtk.Object
+-- gtk.Widget
+-- gtk.Container
+-- gtk.Bin
+-- gtk.Item
+-- gtk.MenuItem
+-- gtk.CheckMenuItem
Implemented Interfacesgtk.CheckMenuItem
implements
gtk.Buildablegtk.CheckMenuItem Propertiesgtk.Object Propertiesgtk.Widget Propertiesgtk.Container Properties
"active"Read/WriteIf True, the menu item is checked."inconsistent"Read/WriteIf True, display an "inconsistent"
state."draw-as-radio"Read/WriteIf True, display like a radio menu item.
GTK+ 2.4 and above.
"indicator-size"ReadThe size of the check or radio indicator.
Attributes
"active"ReadIf True, the menu item is
checked.
gtk.CheckMenuItem Signal Prototypesgobject.GObject Signal Prototypesgtk.Object Signal Prototypesgtk.Widget Signal Prototypesgtk.Container Signal Prototypesgtk.Item Signal Prototypesgtk.MenuItem Signal Prototypes"toggled"callbackcheckmenuitemuser_param1...DescriptionA gtk.CheckMenuItem
is a menu item that maintains the state of a boolean value in addition to a
gtk.MenuItem's
usual role in activating application code. A check box indicating the state
of the boolean value is displayed at the left side of the gtk.MenuItem.
Activating the gtk.MenuItem
toggles the value.Constructorgtk.CheckMenuItemlabelNoneuse_underlineTruelabel :a string to be used as the label text or
Noneuse_underline :if True, an underscore in the
label text indicates the next character should be underlined and used for the
mnemonic accelerator key if it is the first character so
marked. Available in PyGTK 2.4 and above.Returns :a new checkmenuitemCreates a new checkmenuitem with a text label specified by
label. If label is
None or not specified then no label is created. If
label contains underscore characters then the
character following the underscore will be underlined and the character
following the first underscore will be used as the mnemonic keyboard
accelerator.In PyGTK 2.4 and above the use_underline
parameter is available and defaults to True. If
use_underline is set to False the
label text will not be parsed for mnemonic characters.Methodsgtk.CheckMenuItem.set_activeset_activeis_activeis_active :If True set the check box
activeThe set_active() method sets the active
state of the menu item's check box according to the value of
is_active.gtk.CheckMenuItem.get_activeget_activeReturns :True if the menu item is
checked (check box is active).The get_active() method returns whether
the check menu item is active. See gtk.CheckMenuItem.set_active().gtk.CheckMenuItem.toggledtoggledThe toggle() method emits the "toggled" signal on the
checkmenuitemgtk.CheckMenuItem.set_inconsistentset_inconsistentsettingsetting :If True display an
"inconsistent" third state checkThe set_inconsistent() method sets the
check box to display an "inconsistent" state if the value of
setting is True. The
"inconsistent" state display is removed if setting is
False.An application may want to display an "inconsistent" state if
the user has selected a range of elements (such as some text or spreadsheet
cells) that are affected by a boolean setting, and the current values for
those elements cannot be represented by a single checkmenuitem state. The
set_inconsistent() method only affects visual
appearance, it doesn't affect the semantics of the widget.gtk.CheckMenuItem.get_inconsistentget_inconsistentReturns :True if the checkmenuitem
displays the "inconsistent" stateThe get_inconsistent() method retrieves
the value set by the set_inconsistent()
method.gtk.CheckMenuItem.set_draw_as_radioset_draw_as_radiodraw_as_radiodraw_as_radio :If True display the check
menu item like a radio menu itemThis method is available in PyGTK 2.4 and above.The set_draw_as_radio() method displays
the check menu item like a radio menu item if the value of
draw_as_radio is True. If
draw_as_radio is False the check
menu item is displayed as normal.gtk.CheckMenuItem.get_draw_as_radioget_draw_as_radioReturns :True if the checkmenuitem
should be displayed like a radio menu item.This method is available in PyGTK 2.4 and above.The get_draw_as_radio() method
retrieves the value set by the set_draw_as_radio()
method.SignalsThe "toggled" gtk.CheckMenuItem Signalcallbackcheckmenuitemuser_param1...checkmenuitem :the checkmenuitem that received the
signaluser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)The "toggled" signal is emitted when the checkmenuitem changes
state.