Difference between revisions of "Component: Slider control (Advanced Shapes)"
From Flowcode Help
Jump to navigationJump to search (XML import - Pre 8.0 release) |
|||
Line 1: | Line 1: | ||
− | + | {| style="width:50%" | |
− | |||
− | {| | ||
|- | |- | ||
− | | width="20%" style="color: gray;" | Author | + | | width="20%" style="color:gray;" | Author |
| Matrix Ltd | | Matrix Ltd | ||
|- | |- | ||
− | | width="20%" style="color: gray;" | Version | + | | width="20%" style="color:gray;" | Version |
− | | 1.1 | + | | 1.1 |
|- | |- | ||
− | | width="20%" style="color: gray;" | Category | + | | width="20%" style="color:gray;" | Category |
| Advanced Shapes | | Advanced Shapes | ||
|} | |} | ||
+ | ==Slider control component== | ||
+ | A simple graphical interface for a vertical meter or slider control. This can be used within custom components to give them a way to display an analogue value, or to allow setting a value by clicking and dragging with the mouse. | ||
− | == | + | ==Detailed description== |
− | |||
− | |||
− | |||
+ | ''No detailed description exists yet for this component'' | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Simple example showing how to use the simulation slider component as a meter display for use in monitoring type applications. | Simple example showing how to use the simulation slider component as a meter display for use in monitoring type applications. | ||
{{Fcfile|Meters.fcfx|Meters}} | {{Fcfile|Meters.fcfx|Meters}} | ||
Line 27: | Line 27: | ||
==Downloadable macro reference== | ==Downloadable macro reference== | ||
− | ''This | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetValue''' | ||
+ | |- | ||
+ | | colspan="2" | Gets the current value of the slider. This will be within the range set by the SetRange macro. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | === | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
− | + | |- | |
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetValue''' | ||
+ | |- | ||
+ | | colspan="2" | Set the current value of the slider. This will override any value set by using the mouse. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | Value | ||
+ | |- | ||
+ | | colspan="2" | The value to set. | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | ''' | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetInteractive''' | ||
+ | |- | ||
+ | | colspan="2" | Set whether the mouse can be used to change the slider value. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | Enable | ||
+ | |- | ||
+ | | colspan="2" | Set true to allow clicks to set scale | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShowScale''' | ||
+ | |- | ||
+ | | colspan="2" | Set whether graduated marking are shown along the length of the slider. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | Show | ||
+ | |- | ||
+ | | colspan="2" | True to show scale, else false | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | :[[ | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRange''' | ||
+ | |- | ||
+ | | colspan="2" | Set the minimum and maximum values that can be shown on the slider. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | Min | ||
+ | |- | ||
+ | | colspan="2" | Min (start) value | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | Max | ||
+ | |- | ||
+ | | colspan="2" | Maximum (end) value | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | === | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
− | + | |- | |
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMarks''' | ||
+ | |- | ||
+ | | colspan="2" | Decides on the presentation of the dial | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | Marks | ||
+ | |- | ||
+ | | colspan="2" | Number of marks on the dial | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | Subs | ||
+ | |- | ||
+ | | colspan="2" | Number of marks before a 'main' mark - can be zero | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | :[[ | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
− | :: | + | |- |
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ClearArea''' | ||
+ | |- | ||
+ | | colspan="2" | Clears the draw area | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | '''Return | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetRange''' | ||
+ | |- | ||
+ | | colspan="2" | Sets the min-max range to draw on the dial Used for setting the needle | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | Start | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | End | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetGaps''' | ||
+ | |- | ||
+ | | colspan="2" | Sets the min-max of the span to draw on the X/Y marks Defaults are 0 and 1 | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | Start | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | End | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | |||
− | ''' | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetJustify''' | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | RAlign | ||
+ | |- | ||
+ | | colspan="2" | True for right/top/outer alignment | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CalcAngle''' | ||
+ | |- | ||
+ | | colspan="2" | Decide the angle to display at given a range value | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | RangeVal | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | :'' | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPivotPos''' | ||
+ | |- | ||
+ | | colspan="2" | Sets the position of the object the lever rotates around | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | PositionHandle | ||
+ | |- | ||
+ | | colspan="2" | A handle to the position of the depressed location | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | === | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
− | '' | + | |- |
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoReset''' | ||
+ | |- | ||
+ | | colspan="2" | Sets the state of the auto-reset flag If the flag is true (it is by default) then Button Helper will reset the state of each button on stop | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | State | ||
+ | |- | ||
+ | | colspan="2" | Set true to reset to off on sim stop, else false to retain state | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetLatching''' | ||
+ | |- | ||
+ | | colspan="2" | Sets whether the button is depressed when the mouse is released | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | Enabled | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | :'' | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Unregister''' | ||
+ | |- | ||
+ | | colspan="2" | Removes the object to the list if present | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | Target | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | '''Return | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMovementFor''' | ||
+ | |- | ||
+ | | colspan="2" | Sets the movement in units or PI/16 steps for the button | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | Target | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | Move | ||
+ | |- | ||
+ | | colspan="2" | Movement to set to, default 4 | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | |||
− | |||
− | + | ==Property reference== | |
− | :[[ | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
− | :: | + | |- |
− | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | |
− | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | |
− | ''' | + | |- |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections''' | |
− | + | |- | |
− | == | + | |- |
− | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations''' | |
− | ''' | + | |- |
− | + | |} | |
− | |||
− | |||
− | |||
− | :[[ | ||
− | :: | ||
− | |||
− | |||
− | ''' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 16:14, 16 November 2021
Author | Matrix Ltd |
Version | 1.1 |
Category | Advanced Shapes |
Contents
Slider control component
A simple graphical interface for a vertical meter or slider control. This can be used within custom components to give them a way to display an analogue value, or to allow setting a value by clicking and dragging with the mouse.
Detailed description
No detailed description exists yet for this component
Examples
Simple example showing how to use the simulation slider component as a meter display for use in monitoring type applications.
Meters
Downloadable macro reference
![]() |
GetValue |
Gets the current value of the slider. This will be within the range set by the SetRange macro. | |
[[File:]] - | Return |
![]() |
SetValue |
Set the current value of the slider. This will override any value set by using the mouse. | |
[[File:]] - | Value |
The value to set. | |
![]() |
Return |
![]() |
SetInteractive |
Set whether the mouse can be used to change the slider value. | |
[[File:]] - | Enable |
Set true to allow clicks to set scale | |
![]() |
Return |
![]() |
ShowScale |
Set whether graduated marking are shown along the length of the slider. | |
[[File:]] - | Show |
True to show scale, else false | |
![]() |
Return |
![]() |
SetRange |
Set the minimum and maximum values that can be shown on the slider. | |
[[File:]] - | Min |
Min (start) value | |
[[File:]] - | Max |
Maximum (end) value | |
![]() |
Return |
![]() |
SetMarks |
Decides on the presentation of the dial | |
[[File:]] - | Marks |
Number of marks on the dial | |
[[File:]] - | Subs |
Number of marks before a 'main' mark - can be zero | |
![]() |
Return |
![]() |
ClearArea |
Clears the draw area | |
![]() |
Return |
![]() |
SetRange |
Sets the min-max range to draw on the dial Used for setting the needle | |
[[File:]] - | Start |
[[File:]] - | End |
![]() |
Return |
![]() |
SetGaps |
Sets the min-max of the span to draw on the X/Y marks Defaults are 0 and 1 | |
[[File:]] - | Start |
[[File:]] - | End |
![]() |
Return |
![]() |
SetJustify |
[[File:]] - | RAlign |
True for right/top/outer alignment | |
![]() |
Return |
![]() |
CalcAngle |
Decide the angle to display at given a range value | |
[[File:]] - | RangeVal |
[[File:]] - | Return |
![]() |
SetPivotPos |
Sets the position of the object the lever rotates around | |
[[File:]] - | PositionHandle |
A handle to the position of the depressed location | |
![]() |
Return |
![]() |
SetLatching |
Sets whether the button is depressed when the mouse is released | |
[[File:]] - | Enabled |
![]() |
Return |
![]() |
Unregister |
Removes the object to the list if present | |
[[File:]] - | Target |
![]() |
Return |
![]() |
SetMovementFor |
Sets the movement in units or PI/16 steps for the button | |
[[File:]] - | Target |
[[File:]] - | Move |
Movement to set to, default 4 | |
![]() |
Return |
Property reference
![]() |
Properties |
![]() |
Connections |
![]() |
Simulations |