Jump to content

Component: Scale Linear Template (Advanced Shapes): Difference between revisions

From Flowcode Help
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead""
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead""
Line 141: Line 141:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
|-
|-

Revision as of 14:21, 13 July 2026

Author Matrix Ltd
Version 1.2
Category Advanced Shapes


Scale Linear Template component

A base component for drawing scales on horizontal or vertical strips. Can be used to simplify the building of rulers, meters and slider controls. Mouse handling is built in for easy construction of interactive controls.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_Scale_Linear.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_Scale_Linear.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples






Macro reference

GetValue

GetValue
Get the current value from the scale. Will be either the most recent value set by "SetValue", or, if set to "Control" mode, the latest mouse clicked value. 
- FLOAT Return


SetLabel

SetLabel
Set the text of the component's label. 
- STRING Text
New text to set. 
- VOID Return


SetRange

SetRange
Set new maximum and minimum values for the scale. 
- FLOAT Minimum
The minimum value of the scale (Bottom of the component) 
- FLOAT Maximum
The maximum value of the scale (Top of the component) 
- VOID Return


SetValue

SetValue
Set the value for the scale. If a pointer object is defined, it will move to point at the new value. 
- FLOAT Value
Value to set - will be constrained to the minumum-maximum range. 
- VOID Return


Property reference

Properties
Pointer
Sets an object to act as the pointer for the scale. If in 'Display' mode, the pointer will move to show the incoming "SetValue" numbers. In "Control" mode, it will act as an object for setting the value using mouse clicks/drags. 
Track
An object to represent a 'track' parallel to the scale upon which the moving part travels. If the scale is resized or moved, the 'track' object will also be scaled or moved. For example, the 'track' object could be a simple black rectangle to represent the 'slot' in which a slider control moves. 
Orientation
Whether the scale and/or motion should be along the X-axis (horizontal) or Y-axis (vertical) 
Function
Set the mode of the component... Display - the pointer object moves only when a value is set using the 'SetValue' macro. Control - the pointer can be moved using the mouse to set a new value, which can then be read using the 'GetValue' macro. 
Style
Resolution
Determines the amount of detail in the scale graphics - larger values will require more memory and/or loading time etc. 
BG Color
Colour of the background object. 
Positive Color
Markings colour for positive scale values. 
Negative Color
Markings colour for negative values. 
Label Color
Color for the text label. 
Line
Offset %
Distance of the main line from the left or bottom of the component. % of component size. 
Start %
Start position of the scale from the left/bottom of the component.  % of component size. 
End %
End position of the scale from the left/bottom of the component.  % of component size. 
Thickness
Thickness of the main scale line. 
Show
Whether to show or hide the main scale line. 
Marks
Divisions
Number of major divisions of the scale - these can be numbered. 
Offset %
Position of the division lines across the scale - % of component size,. 
Thickness
Thickness of the division lines. 
Subdivisions
Number of smaller divsions between the numbered ones. Set to zero if not required. 
Subs Offset
Position of the sub-division line ends.  % of width across the component. 
Subs Thickness
Thickness of the sub-division lines.. 
Show
Whether to show or hide the divisions and sub-divisions. 
Numbers
Maximum
Maximum number to show on the scale. 
Minimum
Minimum number to show on the scale. 
Decimals
Number of decimal places to show on the numbers. 
Offset %
Distance acrross the scale width to show the numbers.  % of component size. 
Text Size %
Text height of the scale numbers.  % of component size. 
Font
Font for the scale numbers. 
Show
Whether to show or hide the scale numbers. 
Label
Text
Text label for the component to aid identification. 
Offset X %
X - position of the label.  % of Width. 
Offset Y %
Y position of label.  % of height. 
Text Size %
Text size of label.  % of component size. 
Font
Font for the component label. 
Show
Whether to show or hide the text label.