Difference between revisions of "Component: Slider control (Advanced Shapes)"
From Flowcode Help
Jump to navigationJump to search| (8 intermediate revisions by the same user not shown) | |||
| Line 17: | Line 17: | ||
| ==Component Source Code== | ==Component Source Code== | ||
| − | Please click here  | + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_slider.fcfx FC_Comp_Source_slider.fcfx] | 
| + | |||
| + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_slider.fcfx FC_Comp_Source_slider.fcfx] | ||
| ==Detailed description== | ==Detailed description== | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| Line 36: | Line 48: | ||
| ==Examples== | ==Examples== | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| Line 53: | Line 75: | ||
| {{Fcfile|Meters.fcfx|Meters}} | {{Fcfile|Meters.fcfx|Meters}} | ||
| − | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==Macro reference== | ||
| + | |||
| + | ===GetValue=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| |- | |- | ||
| Line 68: | Line 101: | ||
| + | ===SetInteractive=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| |- | |- | ||
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetInteractive''' | 
| |- | |- | ||
| − | | colspan="2" | Set the  | + | | colspan="2" | Set whether the mouse can be used to change the slider value.  | 
| |- | |- | ||
| |- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | 
| − | | width="90%" |  | + | | width="90%" | Enable | 
| |- | |- | ||
| − | | colspan="2" |  | + | | 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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
| Line 86: | Line 120: | ||
| + | ===SetRange=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| |- | |- | ||
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | 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:Fc9-s16-icon.png]] - INT | 
| + | | width="90%" | Min | ||
| |- | |- | ||
| + | | colspan="2" | Min (start) value  | ||
| |- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT | 
| − | | width="90%" |  | + | | width="90%" | Max | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | Maximum (end) value  | 
| |- | |- | ||
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
| Line 104: | Line 144: | ||
| + | ===SetValue=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| |- | |- | ||
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetValue''' | 
| |- | |- | ||
| − | | colspan="2" | Set  | + | | colspan="2" | Set the current value of the slider.  This will override any value set by using the mouse.  | 
| |- | |- | ||
| |- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT | 
| − | | width="90%" |  | + | | width="90%" | Value | 
| |- | |- | ||
| − | | colspan="2" |  | + | | colspan="2" | The value to set.  | 
| |- | |- | ||
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
| Line 122: | Line 163: | ||
| + | ===ShowScale=== | ||
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| |- | |- | ||
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ShowScale''' | 
| |- | |- | ||
| − | | colspan="2" | Set the  | + | | colspan="2" | Set whether graduated marking are shown along the length of the slider.  | 
| |- | |- | ||
| |- | |- | ||
| − | | width="10%" align="center" | [[File:Fc9- | + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | 
| − | | width="90%" |  | + | | width="90%" | Show | 
| |- | |- | ||
| − | | colspan="2" |  | + | | 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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
| |} | |} | ||
| − | |||
| − | |||
Latest revision as of 13:14, 7 February 2023
| 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.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_slider.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_slider.fcfx
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
Meters
Macro reference
GetValue
|   | GetValue | 
| Gets the current value of the slider. This will be within the range set by the SetRange macro. | |
|  - FLOAT | Return | 
SetInteractive
|   | SetInteractive | 
| Set whether the mouse can be used to change the slider value. | |
|  - BOOL | Enable | 
| Set true to allow clicks to set scale | |
|  - VOID | Return | 
SetRange
|   | SetRange | 
| Set the minimum and maximum values that can be shown on the slider. | |
|  - INT | Min | 
| Min (start) value | |
|  - INT | Max | 
| Maximum (end) value | |
|  - VOID | Return | 
SetValue
|   | SetValue | 
| Set the current value of the slider. This will override any value set by using the mouse. | |
|  - FLOAT | Value | 
| The value to set. | |
|  - VOID | Return | 
ShowScale
|   | ShowScale | 
| Set whether graduated marking are shown along the length of the slider. | |
|  - BOOL | Show | 
| True to show scale, else false | |
|  - VOID | Return | 
Property reference
|   | Properties | 
