Xbasic

{TRACKBAR}

Syntax

{TRACKBAR =%T= Tickmarks ;E= Increments [ ;L= Low ][ ;H= High ] % Width, Height Variable_Name }

Arguments

Tickmarks

Character. Sets the style of the tickmarks. Allowable values are: "T" = Ticks along top "B" = Ticks along bottom "L" = Ticks along left "R" = Ticks along right "T" = Ticks along top "A" = Ticks on both sides "E" = Ticks on endpoints only

Increments

Numeric. The frequency of tickmarks. Allowable values are: 1 = One per tickmark. 10 = One per 10 tickmarks.

Low

Numeric. Optional. Default = 0. The lowest possible value.

High

Numeric. Optional. Default = 100. The highest possible value.

Width

Numeric. The width of the control in characters, by default based on Arial 8 point.

Height

Numeric. The height of the control in lines, by default based on Arial 8 point.

Variable_Name

Character. A variable or expression that evaluates to a number.

Description

The {TRACKBAR} command puts a trackbar control on an Xdialog.

Example

The following example shows various styles of trackbar controls. Picture

num = 0
ui_dlg_box("x",<<%dlg%
{trackbar=%T=T;E=10%50,3num};
{trackbar=%T=B;E=10%50,3num};
{trackbar=%T=R;E=10%6,20num}{trackbar=%T=L;E=10%6,20num}
{trackbar=%T=A;E=10%8,10num}{trackbar=%T=E;E=10%8,10num};
num

%dlg%)
'%% options for trackbars tickmarks
'
'T=T - ticks along top
'T=B - ticks along bottom
'T=L - ticks along left
'T=R - ticks along right
'T=A - Ticks on both sides
'T=E - ticks on endpoints only
'
'Each tickmark increment is set by the E option
'
'E=1 means 1 tick mark for every unit
'E=10 means 1 tick mark for every 10 units
'
'Other settings - reset Low and High points -(default to 0 and 100)
'
'L=Low point
'H=High point
images/XD_Trackbar.gif

Limitations

Desktop applications only

See Also