Overview of Item Types

Checkboxmenuitem Items

Checkboxmenutem items are widgets that are elements of pull-down or pop-up menus. When they are a member of a menu, they can be activated by moving the mouse over them and letting go. They maintain a binary state that is visually represented on the itme. When a checkboxmenuitem is activated, an associated script will be fired. Checkboxmenuitems are created with widget commands of the following form:

pathName create checkboxmenuitem [option value option value ...]

Checkboxmenuitems are one of several widgets that are designed to mirror the functionality and usage of the standard widgets in Java's Abstract Windowing Toolkit (AWT). When checkboxmenuitems are created, they automatically get the tag "CheckboxMenuItem". Checkboxmenuitems have default event handlers which define their behavior. These event handlers are defined on the tag "CheckboxMenuItem" for the "Run" event mode. See the section on Default Bindings for more details about the event bindings.

The following options are supported for checkboxmenuitems:

-command [14] Callback that is executed when menuitem is pressed

-fill [23] Specifies fill color of menuitem

-font [24] Specifies font to use for text

-pen [45] Specifies pen color of menuitem

-relief [49] Specifies how border should be rendered (raised, flat, sunken, ridge, groove)

-state [53] State of the menuitem normal, active, or disabled)

-text [56] The text of the menuitem

See the documention for Menu and Choicemenu items for some example code that uses checkboxmenuitems.


Pad++ Reference Manual - 20 JUN 1997

Copyright Computer Science Department, The University of New Mexico

Web Accessibility