gSpin
| Definition: |
include xpGUI.e
gdx id = gSpin([rtn value_changed=NULL,] string attributes="", dword_seq args={}) |
| Description: |
Creates a spin control.
value_changed: (optional) a procedure to be invoked when the contents are changed, see VALUE_CHANGED below. For more information on the attributes and args parameters see gSetAttributes(). This is a paranormalised function. (see technicalia) Returns: the identifier of the created element. |
| pwa/p2js: | Supported. |
| Example: |
-- demo\xpGUI\gSpin.exw
include xpGUI.e
procedure value_changed(gdx id)
?{"value_changed",id,gGetInt(id,"VALUE")}
end procedure
gdx spin = gSpin(value_changed,"MARGIN=13x13,VALUE=5"),
dlg = gDialog(gHbox({spin}),`gSpin`,`SIZE=240x80`)
gShow(dlg)
gMainLoop()
|
| Attributes: | |
| RANGE |
the min/maximum values. Default: {0,100}. |
| STEP |
the inc/decrement value, must be a positive integer (see technicalia). Default: 1.
|
| VALUE |
The current (integer) value of the control, initially blank. |
| WRAP |
(creation only) should the position reach either limit, continue from the opposite limit.
Default: false.
|
| also | ACTIVE, CANFOCUS, FONT, EXPAND, MARGIN, MINSIZE, MAXSIZE, SIZE, TIP, VISIBLE. |
| Handlers: |
|
| VALUE_CHANGED |
Called after the value was interactively changed by the user.
procedure value_changed(gdx id) id: identifier of the element that activated the event. |
| also |
CLICK,
KEY: All common handlers are supported. |