Page 1 of 1

How to rename tabs?

Posted: Sat May 31, 2003 12:07 am
by TheVelvetTeddyBear
says it all in the topic, i have 5 tabs, and i need to be able to rename anyone of them at any time, i cant find how.

Posted: Sat May 31, 2003 12:25 am
by Berikco
This could work.

Code: Select all

TabNumber = 1
Text$="TabText"
TabParameter.TC_ITEM
TabParameter\mask = #TCIF_TEXT
TabParameter\pszText = @Text$
SendMessage_(GadgetID(#Gadget), #TCM_SETITEM, TabNumber, @TabParameter)
RedrawWindow_(GadgetID(#Gadget),  0, 0, #RDW_INVALIDATE  )

Posted: Sat May 31, 2003 3:09 am
by Paul
LOL ... it's much easier to just use native PB commands:

SetGadgetItemText(#Panel,tabindex,"Text",0)


#Panel is the constant of your PanelGadget
tabindex is the tab you wish to change (first tab starting at 0)

So if you have a PanelGadget with 3 tabs and wish to change the last tab, the tabindex would be 2.

Enjoy :)

Posted: Sat May 31, 2003 2:41 pm
by Berikco
LOL, i use to much API.....never read manuals :D