CwTrackBar
CwTrackBar provides a visual means of representing a value in a range of values. A slider can be positioned at one of a number of ticks to express the value.
Protocol
clearSelection
Clear the current selection in the receiver.
increment
Answer the number of ticks the slider will move when the left orright arrows are pressed.
increment: anInteger
Set the number of ticks the slider will move when the left or right arrows are pressed.
maximum
Answer the largest value of the slider.
maximum: anInteger
Set the largest value of the slider.
minimum
Answer the smallest value of the slider.
minimum: anInteger
Set the smallest value of the slider.
orientation
Answer whether the slider is oriented horizontally or vertically.
XmHORIZONTAL - The slider moves horizontally.
XmVERTICAL - The slider moves vertically.
orientation: anInteger
Set whether the slider is oriented horizontally or vertically.
pageIncrement
Answer the number of ticks the sider will move when the page up or page down keys are pressed or when the mouse is clicked to the left or right of the slider.
pageIncrement: anInteger
Set the number of ticks the sider will move when the page up or page down keys are pressed or when the mouse is clicked to the left or right of the slider.
selection
Answer the start and end of the select range in the slider, if the select range is enabled.
selection: aPoint
Set the start and end of the select range in the slider, if the select range is enabled.
showSelection
Answer whether the slider can have a select range.
showSelection: aBoolean
Set whether the slider can have a select range.
showTickBottom
Answer true if tick marks are positioned along the bottom of the slider if it is horizontal, or along the right side if it is vertical. Answer false if no tick marks are placed on the bottom/right.
showTickBottom: aBoolean
Set where the tick marks displayed on the receiver are positioned. If true, tick marks are positioned along the bottom of the slider if it is horizontal, or along the right side if it is vertical. If false, no tick marks are placed on the bottom/right.
showTickTop
Answer true if tick marks are positioned along the top of the slider if it is horizontal, or along the left side if it is vertical. Answer false ifno tick marks are placed on the top/left.
showTickTop: aBoolean
Set where the tick marks displayed on the receiver are positioned . If true, tick marks are positioned along the top of the slider if it is horizontal, or along the left side if it is vertical. If false, no tick marks are placed on the top/left.
tickFrequency
Answer the frequency of the tick marks on a slider in relation to its range
tickFrequency: anInteger
Set the frequency of the tick marks on a slider in relation to its range
value
Answer the current position of the slider.
value: anInteger
Set the current position of the slider.
Callbacks and Events
The track bar has callbacks specific to it.
drag
executed when the slider is moved either by clicking or using the keyboard. Callback data object is CwValueCallbackData.
valueChanged
executed when the slider is released while being dragged. Callback data object is CwValueCallbackData.
Example
The followind code snippet creates a track bar.
trackBar := CwTrackBar
createWidget: 'TrackBar' "$NON-NLS$"
parent: shell
argBlock: nil.
trackBar manageChild.
Last modified date: 01/29/2015