Component: Scale Linear Template (Advanced Shapes)

From Flowcode Help
Jump to navigationJump to search
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

Fc9-comp-macro.png 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. 
Fc9-f32-icon.png - FLOAT Return


SetLabel

Fc9-comp-macro.png SetLabel
Set the text of the component's label. 
Fc9-string-icon.png - STRING Text
New text to set. 
Fc9-void-icon.png - VOID Return


SetRange

Fc9-comp-macro.png SetRange
Set new maximum and minimum values for the scale. 
Fc9-f32-icon.png - FLOAT Minimum
The minimum value of the scale (Bottom of the component) 
Fc9-f32-icon.png - FLOAT Maximum
The maximum value of the scale (Top of the component) 
Fc9-void-icon.png - VOID Return


SetValue

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


Property reference

Fc9-prop-icon.png Properties
Fc9-type-17-icon.png 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. 
Fc9-type-17-icon.png 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. 
Fc9-type-16-icon.png Orientation
Whether the scale and/or motion should be along the X-axis (horizontal) or Y-axis (vertical) 
Fc9-type-16-icon.png 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. 
Fc9-conn-icon.png Style
Fc9-type-14-icon.png Resolution
Determines the amount of detail in the scale graphics - larger values will require more memory and/or loading time etc. 
Fc9-type-2-icon.png BG Color
Colour of the background object. 
Fc9-type-1-icon.png Positive Color
Markings colour for positive scale values. 
Fc9-type-1-icon.png Negative Color
Markings colour for negative values. 
Fc9-type-1-icon.png Label Color
Color for the text label. 
Fc9-conn-icon.png Line
Fc9-type-14-icon.png Offset %
Distance of the main line from the left or bottom of the component. % of component size. 
Fc9-type-14-icon.png Start %
Start position of the scale from the left/bottom of the component. % of component size. 
Fc9-type-14-icon.png End %
End position of the scale from the left/bottom of the component. % of component size. 
Fc9-type-15-icon.png Thickness
Thickness of the main scale line. 
Fc9-type-7-icon.png Show
Whether to show or hide the main scale line. 
Fc9-conn-icon.png Marks
Fc9-type-14-icon.png Divisions
Number of major divisions of the scale - these can be numbered. 
Fc9-type-14-icon.png Offset %
Position of the division lines across the scale - % of component size,. 
Fc9-type-15-icon.png Thickness
Thickness of the division lines. 
Fc9-type-14-icon.png Subdivisions
Number of smaller divsions between the numbered ones. Set to zero if not required. 
Fc9-type-14-icon.png Subs Offset
Position of the sub-division line ends. % of width across the component. 
Fc9-type-15-icon.png Subs Thickness
Thickness of the sub-division lines.. 
Fc9-type-7-icon.png Show
Whether to show or hide the divisions and sub-divisions. 
Fc9-conn-icon.png Numbers
Fc9-type-15-icon.png Maximum
Maximum number to show on the scale. 
Fc9-type-15-icon.png Minimum
Minimum number to show on the scale. 
Fc9-type-14-icon.png Decimals
Number of decimal places to show on the numbers. 
Fc9-type-14-icon.png Offset %
Distance acrross the scale width to show the numbers. % of component size. 
Fc9-type-14-icon.png Text Size %
Text height of the scale numbers. % of component size. 
Fc9-type-3-icon.png Font
Font for the scale numbers. 
Fc9-type-7-icon.png Show
Whether to show or hide the scale numbers. 
Fc9-conn-icon.png Label
Fc9-type-10-icon.png Text
Text label for the component to aid identification. 
Fc9-type-14-icon.png Offset X %
X - position of the label. % of Width. 
Fc9-type-14-icon.png Offset Y %
Y position of label. % of height. 
Fc9-type-14-icon.png Text Size %
Text size of label. % of component size. 
Fc9-type-3-icon.png Font
Font for the component label. 
Fc9-type-7-icon.png Show
Whether to show or hide the text label.