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.selectindex - Function Up: checkmenu - Tool Previous: checkmenu.extend - Function


checkmenu.replace - Function



Package display
Module widgets
Tool checkmenu


Replace the menu with the provided items


Synopsis
replace(label, names, values, width)


Arguments

label The label of the menu
Allowed: String
Default: ``checkmenu''
names The menu item names
Allowed: Vector of strings
Default: Empty menu
values The menu item values
Allowed: Vector of anything
Default: Empty menu
width Width in character units
Allowed: Integer
Default: 0 [Auto-scale]


Returns
Bool



Description

This tool function replaces the menu with the supplied items. If you set width=-1 then the menu button width will be left as it is. Thus if you constructed with width=0, the button will resize itself to accomodate the new text. If you used a specific non-zero width at construction time, setting width=-1 now will leave the button at that width. Setting width=0 will now force a resize and setting width to some positive integer will resize to that width.



Example
- f := frame();
- m := checkmenu(f, 'Models', "gaussian point", [1,2])
- m.getnames();
gaussian point
- m.getvalues();
[1 2]
- m.replace('Animals', "cat dog fish");
- m.getnames();
cat dog fish
- m.getvalues();
cat dog fish
-





next up previous contents index
Next: checkmenu.selectindex - Function Up: checkmenu - Tool Previous: checkmenu.extend - 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