Online Help
This Slider plugin object is used to create a common Windows slider control. Several properties of the slider can be set using design-time properties and runtime actions. The slider also fires several events.
The minimum range of the slider.
The maximum range of the slider.
Fires when the position of the slider changes.
(number) The current position of the slider.
Fires when a key is pressed while the slider has focus.
(number) The ASCII code of the key that was pressed.
(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.
Fires when the slider gets input focus.
Gets the minimum and maximum values of a slider object.
(string) The name of the slider object that you want to apply this action to.
(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.
-- Get the range of a slider object and show
-- the result in a message box
Range = Slider.GetRange ("MySlider");
if (Range) then
RangeString = "Minimum = " .. Range.Minimum .. ", Maximum = " .. Range.Maximum;
Dialog.Message("Range", RangeString);
end
Sets the minimum and maximum values of a slider object.
(string) The name of the slider object that you want to apply this action to.
(number) The minimum range of the slider (defaults to 0).
(number) The maximum range of the slider (defaults to 100).
Nothing. You can use Application.GetLastError to determine whether this action failed, and why.
-- Set the slider range from 1 to 10
Slider.SetRange ("MySlider", 1, 10);
Gets the current position a slider object.
(string) The name of the slider object that you want to apply this action to.
(number) The current position (or "value") of the slider.
-- Get the current position of a slider
-- and show the result in a message box
Pos = Slider.GetRange ("MySlider");
PosString = "Position = "..Pos;
Dialog.Message("Range",PosString);
Sets the current position of a slider object.
(string) The name of the slider object that you want to apply this action to.
(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.
Nothing. You can use Application.GetLastError to determine whether this action failed, and why.
-- Set the slider position to 80
Slider.SetSliderPos ("MySlider", 80);
1100 - Could not find the specified plugin object or the plugin object is of the wrong type.
Indigo Rose Corporation
support@indigorose.com
The Slider plugin is copyright © 2003-2006 Indigo Rose Software Design Corporation.
Copyright © 2006 Indigo Rose Software Design Corporation.
All Rights Reserved.