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


next up previous contents index
Next: selectablelist.disabled - Function Up: selectablelist - Tool Previous: selectablelist - Tool


selectablelist - Constructor



Package display
Module widgets
Tool selectablelist


Construct a selectablelist


Synopsis
selectablelist(parent, lead, list, nbreak, label, updatelabel, casesensitive, hlp, padx, pady, width, height, justify, font, relief, borderwidth, foreground, background, disabled, anchor, fill, widgetset)


Arguments

parent Parent of the menu for the menu/action button
Allowed: Widget
lead Listbox will appear to the sw of this agent
Allowed: Agent
list The list of items
Allowed: Vector of strings
nbreak The break point for menu or listbox usage
Allowed: Integer
Default: 20
label The label for the button
Allowed: Strings
Default: Label
updatelabel Update the text on the button with the selection
Allowed: T or F
Default: F
casesensitive Is the text searching case sensitive
Allowed: T or F
Default: F
hlp Short popuphelp text
Allowed: String
Default: No help
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
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

The width argument can be used in three ways. If width=-1 (the default), the button will be wide enough (and of fixed width) to accomodate all of the item labels in the menu. This means that the GUI won't jitter when you write different length labels into it. If width=0, then the button will change its width to accomodate whatever label is written into it. If width > 0, then the button is again of fixed width, with the width that you specify.

Note that all of the construction arguments refer to the button (plain for listbox or menu), rather than the listbox. You have no control over the form of the listbox (apart from .aipsrc control.



Example
- include 'selectablelist.g'   
- list := "km hm dam m dm cm mm";
- f := frame();
- ls := selectablelist(parent=f, lead=f, list=list, nbreak=5, label='Lengths',
                     updatelabel=T);

A button labelled ``Lengths'' will appear. When it is pressed a listbox will popup to the south-west of the parent. When a selection is made, the label of the button will change to the selection.





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