Language Reference Guide : Events : ChildSliderMove Event
 
Share this page          
ChildSliderMove Event
The ChildSliderMove event is triggered when the user moves the thumb of a SliderField.
This event has the following syntax:
on ChildSliderMove [compositefieldname]
The following attributes of the FrameExec and Event classes can be used in the ChildSliderMove event block:
TriggerField
Specifies the SliderField whose thumb was moved
OriginatorField
Specifies the field specified in the on ChildSliderMove statement
MessageInteger
Specifies the current value of the thumb
Usage: The ChildSliderMove 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 ChildSliderMove (or SliderMove) event and the MessageInteger attribute:
on ChildSliderMove =
{
          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