Slider Plugin Help

SliderEx Plugin

Welcome

SliderEx Object Plugin Help File

Plugin Name :

SliderEx

Current Version :

1.6.0.0

Last Update :

14/04/2008 (dd/mm/yyyy)

Licence :

Freeware Do what ever you want with it
Note : please send a PM or Email to me if you share this plugin on your site or elsewhere

Author :

Reteset reteset@hotmail.com

Copyright :

The SliderEx plugin is copyright © 2008 Reteset.

Copyright © 2008 Reteset.
All Rights Reserved.


Events

Events

On PosChange

Fires when the position of the slider changes.

e_Pos:

(number) The current position of the slider.

On Key

Fires when a key is pressed while the slider has focus.

e_Key:

(number) The ASCII code of the key that was pressed.

e_Modifiers:

(table) A table containing three boolean values that describe which modifier keys were held down while the key was pressed. A modifier key is a key that can be held down while another key is pressed, to "modify" it. There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

On Focus

Fires when the slider gets input focus.

On MouseOver

Fires when user moves mouse over of object.

On MouseLeave

Fires when user moves mouse outside of object.

ShowToolTip

Fires when slider draged by Arrow Keys,PageUp,PageDown,Home,End keys and Left mouse button .
The following event variables are automatically set whenever this event is triggered:

e_Pos:

(number) The current position of the slider.

pos_L:

(number) The current left position of the thumb (relative to current page).

pos_R:

(number) The current right position of the thumb (relative to current page).

pos_T:

(number) The current top position of the thumb (relative to current page).

pos_B:

(number) The current bottom position of the thumb (relative to current page).

Note :
this event will not be fired when slider draged by mouse wheel and do not use e_Pos variable for other than tooltip value

HideToolTip

Fires when following keys are released : Arrow Keys,PageUp,PageDown,Home,End keys and Left mouse button .
Put your code here that hides tooltip


Properties

Properties

Range Minimum

The minimum range of the slider.

Range Maximum

The maximum range of the slider.

Inital Pos

You can adjust an inital position of the slider object When you want to show slider with a specified position. leave 0(zero) if you do not want to use this feature.

Ticks

Specifies the tick marks visible or invisible set Yes for visible tick marks No for invisible tick marks.

Tick Freq

Specifies the frequency of tick marks
for example:
if max range of slider is 100 and Tick Freq = 1 then 100 tick marks will be showed
if max range of slider is 100 and Tick Freq = 10 then 11 tick marks will be showed.
note :
this will affect at runtime if Ticks = Yes
leaving 0(zero) value of this property is not recommended

Orientation

Specifies the orientation of slider object. you can select one of following Horizontal , Vertical .

Thumb

Specifies the thumb orientation of slider object. you can select one of following Left , Right , Top , Bottom , Both .
Left : sets the thumb orientation to left (when slider orientation = Vertical)
Right : sets the thumb orientation to right (when slider orientation = Vertical)
Top : sets the thumb orientation to top (when slider orientation = Horizontal)
Bottom : sets the thumb orientation to bottom (when slider orientation = Horizontal)
Bottom : sets the thumb orientation to left (when slider orientation = Vertical)
Both : creates a square thumb for both direction (when slider orientation = Horizontal and Vertical)

Border

Specifies the border style of slider object. you can select one of following None , Flat , Sunken , Bevel .
None : no border
Flat : a thin-line border
Sunken : a border with a sunken edge
Bevel : a border with a raised edge

Back Color

Specifies the background color of slider object. you can select a color via color picker .


SliderEx.SetTickFreq()

SliderEx.SetTickFreq (string ObjectName, number Frequency);

Description:

Sets the tick frequency of a slider object if tick marks visible.

ObjectName:

(string) The name of the slider object that you want to apply this action to.

Frequency:

(number) Specifies the frequency of tick marks.
for example:
if max range of slider is 100 and Tick Freq = 1 then 100 tick marks will be showed
if max range of slider is 100 and Tick Freq = 10 then 11 tick marks will be showed.

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- Set the tick frequency of slider to 10
SliderEx.SetTickFreq ("MySlider", 10);

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.


SliderEx.SetThumbOrientation()

SliderEx.SetThumbOrientation(string ObjectName, string Orientation);

Description:

Sets the Thumb orientation of a slider object

ObjectName:

(string) The name of the slider object that you want to apply this action to.

Orientation:

(string) The thumb orientation of the slider object. should be one of following. Left , Right , Top , Bottom , Both (case sensitive)
Left : sets the thumb orientation to left (when slider orientation = Vertical)
Right : sets the thumb orientation to right (when slider orientation = Vertical)
Top : sets the thumb orientation to top (when slider orientation = Horizontal)
Bottom : sets the thumb orientation to bottom (when slider orientation = Horizontal)
Bottom : sets the thumb orientation to left (when slider orientation = Vertical)
Both : creates a square thumb for both direction (when slider orientation = Horizontal and Vertical)

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- set thumb orientation of a slider to Top
SliderEx.SetThumbOrientation ("MySlider", "Top");

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.


SliderEx.SetOrientation()

SliderEx.SetOrientation(string ObjectName, string Orientation);

Description:

Sets the orientation of a slider object

ObjectName:

(string) The name of the slider object that you want to apply this action to.

Orientation:

(string) The orientation of the slider object. should be one of following. HORZ , VERT (case sensitive)

HORZ : horizontal
VERT : vertival

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- set orientation of a slider
SliderEx.SetOrientation ("MySlider", "VERT");

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.


SliderEx.SetBorderStyle()

SliderEx.SetBorderStyle (string ObjectName, string BorderStyle);

Description:

Sets the border style of a slider object

ObjectName:

(string) The name of the slider object that you want to apply this action to.

BorderStyle:

(string) The border style of the slider object. should be one of following. None , Flat , Sunken , Bevel

None : no border
Flat : a thin-line border
Sunken : a border with a sunken edge
Bevel : a border with a raised edge

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- remove border of a slider
SliderEx.SetBorderStyle ("MySlider", "None");

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.


SliderEx.SetBGColor()

SliderEx.SetBGColor (string ObjectName, number Color);

Description:

Sets the background color of a slider object.

ObjectName:

(string) The name of the slider object that you want to apply this action to.

Color:

(number) a decimal color value.

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- Set the background color of slider to Red
SliderEx.SetBGColor ("MySlider", 255);

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.


SliderEx.GetWindowHandle()

number SliderEx.GetWindowHandle (string ObjectName);

Description:

Gets the window handle of a slider object.

ObjectName:

(string) The name of the slider object that you want to apply this action to.

Returns:

(number) The window handle of the slider. on error 0

Example:

hWnd = Slider.GetWindowHandle ("MySlider");
Window.SetMask(hWnd, "C:\\MyFile.bmp", true, 0);

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.


SliderEx.GetTickFreq()

number SliderEx.GetTickFreq (string ObjectName);

Description:

Gets the tick frequency of a slider object if tick marks visible.

ObjectName:

(string) The name of the slider object that you want to apply this action to.

Returns:

(number) tick frequency of slider object. on error or tick marks are not visible 0

Example:

nTicks = Slider.GetTickFreq ("MySlider");
SliderEx.SetTickFreq("MySlider_2", nTicks);

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.


SliderEx.GetThumbOrientation()

string SliderEx.GetThumbOrientation (string ObjectName);

Description:

Gets the thumb orientation of a slider object.

ObjectName:

(string) The name of the slider object that you want to apply this action to.

Returns:

(string)returns one of following Left , Right , Top , Bottom , Both.

Example:

szThumbOrientation = SliderEx.GetThumbOrientation ("MySlider");
Dialog.Message("BorderStyle", szThumbOrientation);

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.


SliderEx.GetOrientation()

string SliderEx.GetOrientation (string ObjectName);

Description:

Gets the orientation of a slider object.

ObjectName:

(string) The name of the slider object that you want to apply this action to.

Returns:

(string)returns one of following HORZ , VERT.

HORZ : horizontal
VERT : vertical

Example:

szOrientation = SliderEx.GetOrientation ("MySlider");
Dialog.Message("BorderStyle", szOrientation);

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.


SliderEx.GetBorderStyle()

string SliderEx.GetBorderStyle (string ObjectName);

Description:

Gets the border style of a slider object.

ObjectName:

(string) The name of the slider object that you want to apply this action to.

Returns:

(string)returns one of following None , Flat , Sunken , Bevel.

None : no border
Flat : a thin-line border
Sunken : a border with a sunken edge
Bevel : a border with a raised edge

Example:

szBorDerStyle = SliderEx.GetBorderStyle ("MySlider");
Dialog.Message("BorderStyle", szBorDerStyle);

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.


SliderEx.GetBGColor()

number SliderEx.GetBGColor (string ObjectName);

Description:

Gets the background color of a slider object.

ObjectName:

(string) The name of the slider object that you want to apply this action to.

Returns:

(number) Decimal value of background color. on error 0

Example:

bClr = Slider.GetBGColor ("MySlider");
SliderEx.SetBGColor("MySlider_2", bClr);

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.


SliderEx.SetRange()

SliderEx.SetRange (string ObjectName, number Minimum, number Maximum);

Description:

Sets the minimum and maximum values of a slider object.

ObjectName:

(string) The name of the slider object that you want to apply this action to.

Minimum:

(number) The minimum range of the slider (defaults to 0).

Maximum:

(number) The maximum range of the slider (defaults to 100).

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- Set the slider range from 1 to 10
SliderEx.SetRange ("MySlider", 1, 10);

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.


SliderEx.GetRange()

table SliderEx.GetRange (string ObjectName);

Description:

Gets the minimum and maximum values of a slider object.

ObjectName:

(string) The name of the slider object that you want to apply this action to.

Returns:

(table) A table containing the numerical values of the minimum and maximum ranges. The table indexes are "Minimum" and "Maximum". If an error occurs, nil is returned.

Example:

-- Get the range of a slider object and show
-- the result in a message box
Range = SliderEx.GetRange ("MySlider");
if (Range) then
    RangeString = "Minimum = " .. Range.Minimum .. ", Maximum = " .. Range.Maximum;
    Dialog.Message("Range", RangeString);
end

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.


SliderEx.SetSliderPos()

SliderEx.SetSliderPos (string ObjectName, number Position);

Description:

Sets the current position of a slider object.

ObjectName:

(string) The name of the slider object that you want to apply this action to.

Position:

(number) The position to set the slider to. If this number is greater than the Maximum value of the slider, the slider will be set to the maximum value. If this number is less than the minimum value of the slider, the slider will be set to the minimum value.

Returns:

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.

Example:

-- Set the slider position to 80
SliderEx.SetSliderPos ("MySlider", 80);

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.


SliderEx.GetSliderPos()

number SliderEx.GetSliderPos (string ObjectName);

Description:

Gets the current position a slider object.

ObjectName:

(string) The name of the slider object that you want to apply this action to.

Returns:

(number) The current position (or "value") of the slider.

Example:

-- Get the current position of a slider
-- and show the result in a message box
Pos = Slider.GetSliderPos ("MySlider");
PosString = "Position = "..Pos;
Dialog.Message("Position",PosString);

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.