ToBeReviewed/WIDGET/COMPOUND_WIDGET/
cw_combobox_pm.pro
Like WIDGET_COMBOBOX but here, their are 2 buttons + and - to move the widget from +/- 1
Routine summary
- cw_combobox_pm_set_value, id, value
-
- result = cw_combobox_pm_get_value(id)
-
- result = cw_combobox_pm_event(event)
-
- result = cw_combobox_pm(parent, VALUE=VALUE, UVALUE=UVALUE, UNAME=UNAME, ROW=ROW, COLUMN=COLUMN, _extra=_extra)
-
-
cw_combobox_pm_set_value
Compound widget
cw_combobox_pm_set_value, id, value
Return value
Parameters
id
value
It is the default tick mark value (a floating-point number).
Examples
Version history
Version
$Id: cw_combobox_pm.pro 157 2006-08-21 09:01:50Z navarro $
History
Known issues
Restrictions
Other attributes
Uses routines
cw_combobox_pm_get_value
Compound widget
result = cw_combobox_pm_get_value(id)
Return value
Parameters
id
Examples
Version history
Version
$Id: cw_combobox_pm.pro 157 2006-08-21 09:01:50Z navarro $
History
Known issues
Restrictions
Other attributes
Uses routines
cw_combobox_pm_event
Compound widget
result = cw_combobox_pm_event(event)
Return value
Parameters
event
Examples
Version history
Version
$Id: cw_combobox_pm.pro 157 2006-08-21 09:01:50Z navarro $
History
Known issues
Restrictions
Other attributes
Uses routines
cw_combobox_pm
Compound widget
result = cw_combobox_pm(parent, VALUE=VALUE, UVALUE=UVALUE, UNAME=UNAME, ROW=ROW, COLUMN=COLUMN, _extra=_extra)
Return value
The returned value of this function is the widget ID of the
newly-created animation widget.
Parameters
parent
in
required
The widget ID of the parent widget.
Keywords
VALUE
UVALUE
The user value to be associated with the widget.
UNAME
The user name to be associated with the widget.
ROW
Buttons will be arranged in the number of rows
specified by this keyword.
COLUMN
Buttons will be arranged in the number of columns
specified by this keyword.
_extra
Used to pass your keywords
Examples
See the program provided above (testwid and the associated procedure, testwid_event).
Version history
Version
$Id: cw_combobox_pm.pro 157 2006-08-21 09:01:50Z navarro $
History
Sebastien Masson (smasson@lodyc.jussieu.fr)
6/9/1999
Known issues
Restrictions
Widget Events Returned by Combobox Widgets
Pressing the mouse button while the mouse cursor is over an
element of a combobox widget causes the widget to change the label
on the combobox button and to generate an event. The appearance of
any previously selected element is restored to normal at the same
time. The event structure returned by the WIDGET_EVENT function is
defined by the following statement:
{ CW_COMBOBOX_PM, ID:0L, TOP:0L, HANDLER:0L, INDEX:0L, OUT:0 }
The first three fields are the standard fields found in every
widget event.
INDEX returns the index of the selected item. This can be used to
index the array of names originally used to set the widget''s
value
OUT:It is an integer which can take 3 values:
1 : If we press + when the index is already at the max
Comment: In this case, the index stay at the max
-1: If we press - when the index is already at the min
Comment: In this case, the index stay at the min
0 : In other cases
Keywords to WIDGET_CONTROL
A number of keywords to the WIDGET_CONTROL procedure affect the
behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE.
1) GET_VALUE
widget_control,wid_id,get_value=resultat
Send back, in the result variable, a structure of 3 elements whose
names are inspired by keywords we can pass at widget_control when
we use WIDGET_COMBOBOX:
COMBOBOX_NUMBER: the number of elements currently
contained in the specified combobox widget.
COMBOBOX_SELECT: the zero-based number of the
currently-selected element (i.e., the currently-displayed
element) in the specified combobox widget.
DYNAMIC_RESIZE: a True value (1) if the widget specified
by Widget_ID is a button, combobox, or label widget that
has had its DYNAMIC_RESIZE attribute set. Otherwise,
False (0) is returned.
2) SET_VALUE
widget_control,wid_id,set_value=impose
Allows to modify the state of the combobox like we can do it for
WIDGET_COMBOBOX. May impose:
a) The contents of the list widget (string or string array)
b) A structure which can have for elements (from 1 to 3):
DYNAMIC_RESIZE:Set this keyword to activate (if set to 1)
or deactivate (if set to 0) dynamic resizing of the
specified CW_COMBOBOX_PM widget (see the documentation
for the DYNAMIC_RESIZE keyword to WIDGET_COMBOBOX
procedure for more information about dynamic widget
resizing).
COMBOBOX_SELECT:Set this keyword to return the zero-based
number of the currently-selected element (i.e., the
currently-displayed element) in the specified combobox
widget.
VALUE: The contents of the list widget (string or string
array)
Produced by IDLdoc 2.0 on Tue Aug 29 14:50:48 2006.