NAME: cw_combobox_pm
PURPOSE: widget equivalent a WIDGET_COMBOBOX sauf qu'en plus on
dispose de 2 bouttons + et - pour deplacer le widget de +/- 1.
CATEGORY: compound widget (aide a l''ecriture des widgets)
CALLING SEQUENCE: id=cw_combobox_pm(parent)
INPUTS:
Parent: The widget ID of the parent widget.
KEYWORD PARAMETERS:tous ceux de WIDGET_COMBOBOX
OUTPUTS:
The returned value of this function is the widget ID of the
newly-created animation widget.
COMMON BLOCKS: none
SIDE EFFECTS:
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:c''est un entier qui peut prendre 3 valeurs:
1 : si on appuie sur + alors que l''index est deja aux max. rq:
ds ce cas l''index reste au max
-1: si on appuie sur - alors que l''index est deja aux min. rq:
ds ce cas l''index reste au min
0 : ds les autres cas!
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
retourne ds la variable resultat une structure de 3 elements dont
les noms sont inspires des mots cles que l''on peut passer a
widget_control qd on utilise 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
permet de modifier l''etat de la combobox comme on peut le faire
pour WIDGET_COMBOBOX Impose peut etre:
a) The contents of the list widget (string or string array)
b) une structure qui peut avoir comme elements (de 1 a 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)
RESTRICTIONS:
EXAMPLE: cf utiliser le programme founit i-dessous: testwid et la
procedure associee, testwid_event.