FutureBasic Logo

<<    Index    >> FutureBasic

SegmentedControl   statement / function

Statement syntax
segmentedcontrol tag, enabled, index, rect, segments, wndTag

Function syntax
index = segmentedcontrol(tag)

The segmentedcontrol statement puts a new segmentedcontrol in the current output window, or alters an existing segmentedcontrol's characteristics. The segmentedcontrol function returns control's selected segment and is equivalent to calling fn SegmentedControlSelectedSegment.

tag A number (1 through 1000000) that you assign when you create the segmentedcontrol and that you refer to when altering the control. The number you assign must be different from the tag value of all other existing widgets in the current window. A negative tag hides the control.
enabled A boolean value which specifies whether the segmentedcontrol should be enabled or disabled.
index The initial index of the segmentedcontrol’s selected segment.
rect The segmentedcontrol's enclosing rectangle. This can be specified in either of two ways:
(i) (x,y,w,h) where x,y are the origin and w,h the size of the control.
(ii) A CGRect value
segments The number of segments in the control (default = 3).
wndTag An optional parameter for when the segmentedcontrol's window is not the current output window. Note specifying this parameter does not bring the window to the front or make it the output window.
Dialog event

Apple documentation