Description

Represents a standard Windows trackbar control.

Remarks

A TrackBar is a scrollable control similar to the ScrollBar control. You can configure ranges through which the value of the Value property of a trackbar scrolls by setting the Minimum property to specify the lower end of the the range and the Maximum property to specify the upper end of the range.

You can use this control to input numeric data obtained through the Value property. You can display this numeric data in a control or use it in code.

Example

The following example creates a TrackBar. The code then initializes the range properties Maximum, Minimum, and Value. The OnScroll event is used to report the current position of the slider into a TextBox control.

Break On $System = CreateObject("Kixtart.System") $Form = $System.Form() $TextBox = $Form.Controls.Add("TextBox") $TextBox.Center $TextBox.ReadOnly = True $TrackBar = $Form.Controls.Add("TrackBar") $TrackBar.Center $TrackBar.Top = $TextBox.Bottom + 10 $TrackBar.Maximum = 200 $TrackBar.Minimum = 100 $TrackBar.Value = 150 $TrackBar.OnScroll = "OnTrackBarScroll" $TrackBar.Anchor = 15 Function OnTrackBarScroll() $TextBox.Text = $TrackBar.Value EndFunction $TextBox.Text = $TrackBar.Value $Form.Show While $Form.Visible $=Execute($Form.DoEvents) Loop Exit 1




The CHM file was converted to HTML by chm2web software.