BBjTabCtrl::setBackColorAt

Description

In BBj 14.0 and higher, this method sets the background color for a tab in the BBjTabCtrl.

Syntax

Return Value

Method

void

setBackColorAt(int index, BBjColor color)

Parameters

Variable

Description

index

Specifies the 0-based index of the tab.

color

Specifies the background color to be set on the specified tab.

Return Value

None.

Remarks

None.

Example

rem ' BBjTabCtrl setBackColorAt

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(100,100,400,350,"TabCtrl Tab Colors",$00090083$,$$)
window!.setCallback(bbjapi().ON_CLOSE,"eoj")
tabctrl! = window!.addTabCtrl(200,50,50,300,250,$00000008$)
for tab = 1 to 9
    id = 200 + tab
    child! = window!.addChildWindow(id,0,0,275,205,"",$00010810$,id,$$)
    for edit = 1 to 6
        child!.addEditBox(10+edit,tab*10,edit*30-20,100,25,"")
    next edit
    tabctrl!.addTab("Tab "+str(tab-1),child!)
    color! = bbjapi().makeColor(240,240,240)
    tabctrl!.setBackColorAt(tab-1,color!)
    color! = bbjapi().makeColor(rnd(255),rnd(255),rnd(255))
    tabctrl!.setForeColorAt(tab-1,color!)
    print "Tab",tab,
    print " background: ",tabctrl!.getBackColorAt(tab-1),
    print " foreground: ",tabctrl!.getForeColorAt(tab-1)
next tab

process_events

eoj:
release

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

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