The ExpressionEdit Widget

The ExpressionEdit widget is used by the PTypeToggle to allow users to write expressions. It is unlikely that you will need to write code to open it, except in cases where screen area is too limited for a PTypeToggle and you need more control. It looks and acts similar to a SelectObject, except that instead of bringing up the Tag Browser when the user clicks the … button, an expression entry dialog is displayed. ExpressionEdit uses Start() to resolve what the user types in, so it can be used to select an expression, a tag, or a constant.

The format of the interface is as follows:

ExpressionEdit(Left, Bottom, Right, Top, ParmObjPtr, SetParm, ID, Root[, AllowRootSelection, ParmValueType, TargetSubType, FcnSelectionMode, Title])

Left Left side of graphic
Bottom Bottom edge of graphic
Right Right side of graphic
Top Top edge of graphic
ParmObjPtr The parameter being set
SetParm Set when the parameter has been set
ID Focus ID
ExpressionParent Scope into which to launch expressions.
HideValue 1 (TRUE) to hide expression value (Default: 0 (FALSE))
BGColor Optional background color of the edit box
FGColor Optional foreground color of the edit box
Immutable True if we want to force all tag references to generate immutable reference code. Defaults to FALSE
RootTag Root tag, from which to execute scope operations
AllowRootSelection TRUE to allow Root tag to be selected. Defaults to FALSE
ParmValueType

ValueType of the parameter

  • 0 = Status (boolean)
  • 1 = Short
  • 2 = Long
  • 3 = Double
  • 4 = Text
  • 5 = Octal
  • 6 = Hexadecimal
  • 7 = Color
  • 8 = Object
TargetSubType The target's variable sub-type(s)
FcnSelectionMode

What kind of functions should be selectable:

  • 0 = Script
  • 1 = All Steady State (all) - Default
  • 2 = Steady State, no exclusive Steady States
Title Optional text to use as the window title. Defaults to "Expression" in English.