| Version 1.9 Build 1556
|
|
Next: optionmenu.extend - Function
Up: optionmenu - Tool
Previous: optionmenu - Tool
optionmenu - Constructor
|
Package |
display |
|
Module |
widgets |
|
Tool |
optionmenu |
Construct an optionmenu
Synopsis
optionmenu(parent, labels, names, values, hlp, hlp2, nbreak, padx, pady, width, updatelabel, height, justify, font, relief, borderwidth, foreground, background, disabled, anchor, fill, widgetset)
Arguments
parent |
|
Parent of the menu |
|
|
Allowed: |
Widget |
labels |
|
The menu item labels |
|
|
Allowed: |
Vector of strings |
|
|
Default: |
Empty menu |
names |
|
The menu item names |
|
|
Allowed: |
Vector of strings |
|
|
Default: |
Empty menu |
values |
|
The menu item values |
|
|
Allowed: |
Vector of anything |
|
|
Default: |
Empty menu |
hlp |
|
Short popuphelp text |
|
|
Allowed: |
String |
|
|
Default: |
No help |
hlp2 |
|
Long popuphelp text |
|
|
Allowed: |
String |
|
|
Default: |
No help |
nbreak |
|
The break point for menu or listbox usage |
|
|
Allowed: |
Integer |
|
|
Default: |
20 |
padx |
|
Horizontal padding around text |
|
|
Allowed: |
Integer |
|
|
Default: |
7 |
pady |
|
Vertical padding around text |
|
|
Allowed: |
Integer |
|
|
Default: |
3 |
width |
|
Width in character units |
|
|
Allowed: |
Integer |
|
|
Default: |
Auto-scale |
updatelabel |
|
Update menu label with selected item |
|
|
Allowed: |
T or F |
|
|
Default: |
T |
height |
|
Height in character units |
|
|
Allowed: |
Integer |
|
|
Default: |
1 |
justify |
|
Justification of text |
|
|
Allowed: |
String from `center', 'left', 'right' |
|
|
Default: |
`center' |
font |
|
Font of text |
|
|
Allowed: |
X font |
relief |
|
Edge relief |
|
|
Allowed: |
String from `flat', `ridge',
`raised', `sunken', `groove' |
|
|
Default: |
`groove' |
borderwidth |
|
Border width |
|
|
Allowed: |
Integer |
|
|
Default: |
2 |
foreground |
|
Color of text |
|
|
Allowed: |
X color |
|
|
Default: |
`black' |
background |
|
Background color |
|
|
Allowed: |
X color |
|
|
Default: |
`lightgrey' |
disabled |
|
Is inactivated ? |
|
|
Allowed: |
Boolean |
|
|
Default: |
F |
anchor |
|
Location of text |
|
|
Allowed: |
String from 'c', 'n', 's', 'e', 'w', 'ne',
'nw', 'se', 'sw' |
|
|
Default: |
`c' |
fill |
|
How to expand when resized |
|
|
Allowed: |
String from `x', `y', `both', `none' |
|
|
Default: |
'none' |
widgetset |
|
The widget server to use |
|
|
Allowed: |
widgetserver tool |
|
|
Default: |
dws |
Returns
Agent
Description
This is the constructor. Note that if you give just the
labels argument,
then
names and
values are set equal to
labels.
If you give either of
names or
values, you must
also give
labels (it is the primary).
Example
- include 'optionmenu.g'
- labels := "Absolute RelRef RelCen";
- names := ['Absolute', 'Relative to ref. pixel', 'Relative to center'];
- values := [1,2,3];
- f := frame();
- hlp := 'Select type of coordinate';
- m := optionmenu(f, labels, names, values, hlp);
Creates an optionmenu with a popup menu.
Example
- include 'optionmenu.g'
- labels := "Absolute RelRef RelCen";
- names := ['Absolute', 'Relative to ref. pixel', 'Relative to center'];
- values := [1,2,3];
- f := frame();
- hlp := 'Select type of coordinate';
- m := optionmenu(f, labels, names, values, hlp, nbreak=1)
Creates an optionmenu with a popup listbox.
Next: optionmenu.extend - Function
Up: optionmenu - Tool
Previous: optionmenu - Tool
 
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