INDEX | |||||||||||||||
1. Creating Toolbars | |||||||||||||||
2. Distributing Toolbars | |||||||||||||||
![]() |
3. Reference
|
||||||||||||||
4. Tutorial |
Control Variables
Each toolbar element can have an associated value. This value can be referenced through a variable and used in functions, captions, tooltips etc.
Syntax:%VARIABLE%
Remarks:
- The variable name is the id of the control.
- A control must have a unique id= parameter if you wish to access o set its value.
- Variables in URL strings are automatically URL Encoded. A URL string is a string that begins with a
http:// or https// prefix. This can be disabled by using the %VARIABLE(NONE)% syntax to specify no encoding.
- To force URL encoding on a variable, use the underscore(_) prefix.
- To force URL encoding on a variable, use the unrescore(_) prefix. Examle: %_VARIABLE%.
- To encode a variable in UTF8, use the format: %VARIABLE(UTF8)%.
- To reference control captions, use the format %VARIABLE(CAPTION)%
Example:
<xml id="toolbar">
<toolbar caption="Variables Example">
<control type="toolbar">
<button id=button1 caption="Button 1" value="This is button1 value."></button>
<button id=button2 caption="Button 2" tooltip="%BUTTON1%></button>
</control>
</toolbar>
</xml>
In the above example, a toolbar is created with two buttons. Moving your mouse over the second button displays a tooltip. The tooltip uses the %BUTTON1% variable.
Compatibility
The %VARIABLE(CAPTION)% syntax is supported from version 2.4.1
See Also:
System Variables | SetValue() Function