Silverfrost Logo About Us | Contact Us
 

%sl - Slider

Purpose

To insert a slider control.

Syntax

winio@('%Nsl[option]', valueminmax)
double precision minmax     (input)
double precision value     (input/output)

Modifiers

Caret (^) - call-back is called repeatedly as the user moves the slider or when an arrow key is pressed.

Question mark (?) - a help string is supplied.

Description

N is mandatory and sets the length of the control in average character units.

value is the current value represented by the slider in the range min to max. This value can also be accessed by a call-back function whilst the slider is being moved.

The following options can be used:

verticalProvides a vertical bar.
horizontalProvides a horizontal bar (the default).
ms_styleUses a Microsoft trackbar control and takes INTEGER rather than DOUBLE PRECISON arguments.

The following options can also be used with the INTEGER %SL and imply [ms_style].
(The resulting Microsoft style is shown in brackets).

bothThe trackbar control displays tick marks on both sides of the control, top and bottom for a horizontal bar, left and right for a vertical bar (TBS_BOTH).
top_or_leftA horizontal bar has tick marks on top. A vertical bar has tick marks to the left Otherwise tick marks are bottom (when horizontal) or right (when vertical). (TBS_TOP or TBS_LEFT)
no_ticksNo tick marks are displayed
auto_ticksThe bar has a tick mark for each increment in its range of values (TBS_AUTOTICKS)
tick_frequency=vv is an integer and the bar has tick marks with this frequency
thumb_length=vv is an integer giving the pixel length of the slider (TBS_FIXEDLENGTH)
selection_min=v1The bar is displayed differently with only part of the range enabled
selection_max=v2v1 and v2 are integers that specify the sub-range to be used. (TBS_ENABLESELRANGE)
tooltips=topFor a horizontal bar. Current value appears top right. (TBS_TOOLTIPS with TBTS_TOP)
tooltips=bottomFor a horizontal bar. Current value appears bottom right. (TBS_TOOLTIPS with TBTS_BOTTOM)
tooltips=leftFor a vertical bar. Current value appears left of the slider. (TBS_TOOLTIPS with TBTS_LEFT)
tooltips=rightFor a vertical bar. Current value appears right of the slider. (TBS_TOOLTIPS with TBTS_RIGHT)
borderA border is provided (WS_BORDER)

The slider will respond to the arrow keys on the keyboard.

The value returned by clearwin_info@('LATEST_VARIABLE') can also be used with %sl.

Example

winio@('%20sl', x, 0.0D0, 10.0D0)

See also

%br - Bar

Notes

ms_style and the associated options were introduced with FTN95 8.40.

 

 

 

Copyright © 1999-2018 Silverfrost Limited