BBjStatusBar::setSegments

Description

Sets the segments in the BBjStatusBar control.

Syntax

Return Value

Method

void

setSegments(BBjVector segments!)

Parameters

Variable

Description

segments!

Each element in the vector represents a segment. The value of each element is the end position of each segment, in order.

Return Value

None.

Remarks

There can be no more than 255 segments and the maximum ending position is 65535. If the end position of the last segment is exactly 65535, then all preceding segments are fixed width and the last segment gets whatever is left over. If the end position of the last segment is less than 65535, then all segment widths are proportional based on the current width of the window.

Example

rem ' BBjStatusBar::setSegments

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()

title$ = "BBjStatusBar::setSegments"
window! = sysgui!.addWindow(50,50,300,100,title$,$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")

StatusBar! = window!.addStatusBar(1)
SegmentVector! = bbjapi().makeVector()
SegmentVector!.addItem(100)
SegmentVector!.addItem(200)
StatusBar!.setSegments(SegmentVector!)
StatusBar!.setTextAt(0, "Segment1")
StatusBar!.setTextAt(1, "Segment2")

process_events

eoj:
release

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.