Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: checkmenu - Constructor Up: widgets - Module Previous: blinklabel.done - Function


checkmenu - Tool



Package display
Module widgets


Postscript file available

Tk widget to provide a flat check button menu

include "checkmenu.g"

Constructors
checkmenu Construct a checkmenu
Functions
disabled Disable or enable the checkmenu widget
extend Extend the menu with more items
findname Find the index of the item with the given name
findvalue Find the index of the item with the given value
getlabel Get the label of the menu button
getnames Gets all of the names associated with the menu
getoffstates Get the indices of the items which are not checked
getonstates Get the indices of the items which are checked
getstate Get the state of the specified check button
getstates Get the states of all of the check buttons
getvalues Gets all of the values associated with the menu
isenabled Is the checkmenu widget enabled ?
replace Replace the menu with the provided items
reset Resets the state of all check buttons to F
selectindex Select an item in the menu by index
selectname Select an item in the menu by name
selectvalue Select an item in the menu by value
setbackground Set the color of the background of the checkmenu button
setforeground Set the color of the foreground of the checkmenu button
setlabel Set the label of the checkmenu



Description

This Tk widget enables you to create a flat (i.e. no submenus) menu in a specified frame where all the menu items are check buttons. You can associate a name (that which appears in the menu list) and a value (whatever you like, it may be different from the name) for each menu item.

It can be treated like any of the built in Tk widgets, and has almost all of the same construction arguments as the button Tk widget.

Whenever a selection is made, this widget emits an event called select. In the $value of this event, you can find a record with fields name, value, state (T or F) and index (index of item in menu) containing that information for the selected item.

Whenever the menu is replaced with the replace tool function, this widget emits an event called replaced (it has no value). Note that the tool function extend invokes the replace function, so a replaced event is generated then as well.




next up previous contents index
Next: checkmenu - Constructor Up: widgets - Module Previous: blinklabel.done - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15