Language Reference Guide : 5. Events : SliderMove Event
 
Share this page                  
SliderMove Event
The SliderMove event is triggered when the user moves the thumb of a SliderField.
This event has the following syntax:
on slidermove [sliderfieldname]
The following attributes of the FrameExec and Event classes can be used in the SliderMove event block:
TriggerField
Specifies the SliderField whose thumb was moved
OriginatorField
Specifies the field specified in the on SliderMove statement
MessageInteger
Specifies the current value of the thumb
Usage: The SliderMove event is defined for SliderFields where the Style attribute is SFS_TRACKBAR. Note that the value of the SliderField does not change as the thumb is being dragged, although the MessageInteger does provide the value that the SliderField would have if the mouse button were released.
To set an EntryField “e1” to the value of a SliderField “s1” as the thumb is dragged, use the SliderMove (or ChildSliderMove) event and the MessageInteger attribute:
on slidermove s1 =
{
     e1 = CurFrame.MessageInteger;
     CurFrame.Flush();
}
To set an EntryField “e1” to the final value after dragging a SliderField “s1” and releasing the mouse, use the SetValue event instead:
on setvalue s1 =
{
     e1 = s1;
}
More information:
MessageInteger Attribute
OriginatorField Attribute
TriggerField Attribute