Properties define the appearance or function of a control or interface, for example, the background color of it, or perhaps the formula to use while plotting data. Properties may be set or read through code, or the Interface Editor may be used to access them.
By hovering over an item and pressing F3 the Interface Editor will open to list the available properties.
- Properties with values in blue are digital values and may be set with the checkbox. - Properties with values in yellow are color values. A color may be selected by clicking '...' in the Select Column or manually changing the value. - Other properties with '...', such font settings, may also be selected by clicking '...' or manually changing the value. - All other properties can be changed by entering a new value. - The property list can be filtered by entering a string in the Filter textbox. - The right-most column is help on using that property. A help box may also be opened by selecting a property and right-clicking on it.
Properties may also be set in code, such as through the Debug/CLI Window (press F4 to open), Event code for a control, or from text sent by the microcontroller. When setting a property it is treated as an instruction and must begin with '!'.
Note that properties use an equal sign, instructions do not.
!lblMin.text=-200
The prominent property of a control is typically the default value and does not need to be named, such as text of textbox, the value of a checkbox, the value of meter and so on.
!lblMin=-200
When reading a control, the property is surrounded by brackets [ ] to return the value of the property, a MakerPlot-J value, or a created variable.
? [lblMin.text] ? [lblMin] !lblMin=[plot.minCh0] // Set lblMin text to the plot control's minimum vaue
MakerPlot-J math operations may also be performed when setting a property using either standard math operations or post-fix math operation.
!lblMin = { -200 * 0.5 + 25 } // Standard Math !lblMin = {:: -200 0.5 * 25 + } // post-fix Math
The Debug/CLI Window has very helpful features to access controls, their properties and show current values.
A single property of a control may be automatically updated through use of the Update Value.
Viewing Available Properties
Available properties for an the Interfaces or Controls may be viewed using the Interface Editor as above, using the Debug/CLI or the Code Editor and typing [ for the Main Interface or [name. for Child Interfaces and Controls.
Properties and current values can also be viewed and changed using the Controls Viewer (F6).
|