Older Newer
Sat, 15 Apr 2017 13:25:21 . . . . SyneRyder


Changes by last author:

Added:
= SLIDER =

== Syntax ==

:ctl[n]: SLIDER(Class Specific Properties), Other Properties

== Description ==

:The Slider user control is a trackbar that includes both a text label and a numeric edit control.

== Class Specific Properties ==

:AUTOTICKS

::Automatically sets tick marks according to range amount.

:BOTH

::Makes the thumb square and displays ticks on both sides of the handle

:BOTTOM

::Shows tick marks along the bottom of the slider & changes the thumb to point downwards (default)

:HORZ

::Changes scrollbar orientation to horizontal. (default)

:LEFT

:: Changes orientation of handle and ticks.

:NOTHUMB

:: Hides the thumb of the control (ie the trackbar/slider itself)

:NOTICKS

:: Hides the tick marks on the slider control.

:RIGHT

:: Changes orientation of handle and ticks (default with VERT active)

:TOP

::Shows tick marks along the top of the slider & changes the thumb to point upwards

:TOPTIP

:: Displays the trackbar value as a tooltip beside the handle when dragging the handle.

:VERT

::Changes scrollbar orientation to vertical.

== Other Properties ==

:Color

::Sets the background color of the trackbar.

:Divisor

::Sets the divisor for the number displayed text box, eg 10 for one decimal place. (default = 1)

:EditStyleEx

::Modifies the appearance of the control. Valid values include 'clientedge' and 'staticedge'.

:FontColor

::Sets the font color.

:NoEditBorder

::Hides the border around the text edit portion of the control

:Page

::Sets the trackbar paging jump unit. (default = 10)

:Range

::Sets the numerical range the scrollbar can return. (default = (0, 255))

:Text

::Defines the text label next to the scrollbar. (default = no text)

:Val

::Initializes the scrollbar's value. (default = 0)

== Example ==

<code>

ctl[0]: SLIDER, Text="bottom, ticks", Val=rnd(0,255), FontColor=Blue

ctl[1]: SLIDER(noticks), Text="bottom, noticks", Divisor=10, Val=rnd(0,255)

ctl[2]: SLIDER(top, noticks), Text="top, noticks", Val=rnd(0,255), NoEditBorder, EditStyleEx=staticedge

ctl[3]: SLIDER(both, noticks), Text="both, noticks", Val=rnd(0,255)

ctl[4]: SLIDER(enableselrange, noticks), Text="enableselrange, noticks", Size=(90,12), Val=rnd(0,255), NoEditBorder, EditStyleEx=clientedge

ctl[5]: SLIDER(enableselrange, both, noticks), Text="enableselrange, both, noticks", Size=(90,12), Val=rnd(0,255)

ctl[6]: SLIDER(both, noticks), Text="larger, both, noticks", Size=(90,12), Val=rnd(0,255)

ctl[7]: SLIDER(top, noticks), Text="larger, top, noticks", Size=(90,12), Val=rnd(0,255)

</code>

== Notes ==

:It is best to set the Range before setting the Val. If the Val is set first, it might be clipped by the default Range (0,255) before your custom Range is set. If you set the Range first, you can set Val to any value within that range.

== Also see ==

:STANDARD, SCROLLBAR, TRACKBAR

== Comments ==

:Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.