CreateTabber( x,y,width,height,group[,style] )

Parameters

x,y,width,height - Initial shape of the tabber gadget
group - A group gadget handle
style - Not supported

Description

CreateTabber creates a tabber gadget and returns its handle.

You should create individual tab items by using the InsertGadgetItem command. You can have icons on tabs by using LoadIconStrip and SetGadgetIconStrip

Tabber gadgets generate a gadget action event when the user changes the currently selected item.

Note that you will have to manage hiding and showing gadgets for each tab yourself. It is suggested that you use the CreatePanel command to do this.

Example

; Create a window and some labels
win=CreateWindow("Test Labels",100,100,200,100,0,49)
tab=CreateTabber(0,0,200,100,win)
; get bitmap icon from the Blitz directory
appdir$=SystemProperty("appdir")
blitzdir$=Left(appdir,Len(appdir)-5)
icons=LoadIconStrip(blitzdir$+"\cfg\dbg_toolbar.bmp")
SetGadgetIconStrip tab,icons
InsertGadgetItem(tab,0,"Tab 1",0)
InsertGadgetItem(tab,1,"Tab 2",1)

; The simplest event loop possible!
Repeat
Until WaitEvent()=$803
End ; bye!

Index

Click here to view the latest version of this page online