BBjWindow::setTrack

Description

In BBj 6.00 and higher, this method toggles the tracking mode of the window (see TRACK Mnemonic). By default, tracking is enabled.

Syntax

Return Value

Method

void

setTrack(boolean track)

Parameters

Variable

Description

 

track

Specifies whether tracking is enabled:

0

Do not resize drawn items as the window is resized. If the window was defined with vertical or horizontal scrollbars, they will appear whenever the window is resized to be smaller than its original size.

1

Resize drawn items as the window is resized.

Return Value

None.

Remarks

By default, tracking is enabled.

You can use Window Creation flag $80000000$ to set track to 0 when you create the window with BBjSysGui::addWindow or BBjWindow::addChildWindow.

To enable scroll bars in a window, you should set track to 0 with either this method, the TRACK mnemonic, or Window Creation flag $80000000$. Then, use the window creation flags $00000004$ (horizontal scrolling) or $00000008$ (vertical scrolling) to enable scrolling for the window.

Example

rem ' BBjWindow::setTrack

sysgui! = BBjAPI().openSysGui("X0")
window! = sysgui!.addWindow(100,100,1000,1000,"setTrack",$0001000f$)
window!.setTrack(0)
text$ = "setTrack(0) enables window scrollbars..."
text! = window!.addStaticText(101,50,50,900,900,text$)
font! = sysgui!.makeFont("Arial",72,0)
text!.setFont(font!)
window!.setSize(200,200)
window!.setCallback(window!.ON_CLOSE,"eoj")
process_events

eoj:
release

See Also

BBjAPI

BBjWindow

Object Variables

Track Mnemonic

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