File MIES_ProgrammaticGUIControl.ipf¶
PGC Control GUI controls from code
Prototype functions for #PGC_SetAndActivateControl
-
variable PGC_ButtonControlProcedure(WMButtonAction *ba)¶
-
variable PGC_PopupActionControlProcedure(WMPopupAction *pa)¶
-
variable PGC_CheckboxControlProcedure(WMCheckBoxAction *cba)¶
-
variable PGC_TabControlProcedure(WMTabControlAction *tca)¶
-
variable PGC_SetVariableControlProcedure(WMSetVariableAction *tca)¶
-
variable PGC_SliderControlProcedure(WMSliderAction *sla)¶
-
variable PGC_ListBoxControlProcedure(WMListBoxAction *lba)¶
Functions
-
static variable PGC_ShowControlInTab(string win, string control)¶
Bring all tabs which hold the control to the front (recursively).
Requires that these are managed by
ACL_TabUtilities.ipf
.
-
static string PGC_GetProcAndCheckParamType(string recMacro)¶
-
variable PGC_SetAndActivateControlStr(string win, string control, string str)¶
Wrapper for PGC_SetAndActivateControl()
-
variable PGC_SetAndActivateControlVar(string win, string control, variable var)¶
Wrapper for PGC_SetAndActivateControl()
-
variable PGC_SetAndActivateControl(string win, string control, variable val = defaultValue, string str = defaultValue, variable switchTab = defaultValue, variable mode = defaultValue)¶
Set the control’s value and execute the control procedure of the given control.
The function tries to mimick interactive operation as closely as possible. Therefore interacting with disabled controls results in an assertion. See
mode
for a way to avoid that.PopupMenus:
Only one of
val
orstr
can be suppliedval
is 0-basedstr
must be the name of an entry, can include*
using wildcard syntax.
ValDisp:
Setting this control always changes its mode from ‘internal number’ to ‘global expression’
SetVariable:
Both
str
andval
are accepted and converted to the target type. Read-only controls can only be set withmode = PGC_MODE_FORCE_ON_DISABLED
.
ListBox:
Setting the column is not supported
Simulated event code is 3 (double click)
- Parameters:
win – window name or path, when referring to subwindows in a window hierarchy a full subwindow specification with
#
is requiredcontrol – GUI control
val – [optionality depends on control type] Numeric value to set
str – [optionality depends on control type] String value to set
switchTab – [optional, defaults to false] Switches tabs so that the control is shown
mode – [optional, defaults to PGC_MODE_ASSERT_ON_DISABLED] One of PGC_MODES. Allows to fine tune the behaviour for disabled controls.
- Returns:
1 if the numeric value was modified by control limits, 0 if not (only relevant for SetVariable controls)