Current Page:
NeXtMidas Training
Macros - Part 2 (Graphics)
GControls
Getting and Setting
|
|
- Getting and Setting Values of GControls:
- All of the GControls have a
.value that can be used from the macro.
- When the
PANEL is created the /CONTROLS=GC switch can be
added in.
- When a user changes the value of a GControl, the control sends a message to the macro.
- This message can be viewed in the
processMessage procedure.
startmacro
pipe on
panel/controls=gc
gcontrol lval mynum "MyNum" 50 0 100 5
gcontrol calendar mycal
gcontrol button mybtn "My Buttons" "RED,WHITE,BLUE"
pipe off
endmacro
procedure processMessage m:msg
say "Got message name=^msg.name info=^msg.info data=^msg.data"
return
- NOTE: Certain message names are reserved and have special uses. These
names should be avoided when composing messages. Also, since command id's
become the message name when interacting with the macro, users should not
assign any commands (including gcontrols) an id with one of these reserved names:
EXIT
ERROR
EXEC
MACRO
|
|
|