How to rename tabs?

Just starting out? Need help? Post your questions and find answers here.
TheVelvetTeddyBear
New User
New User
Posts: 4
Joined: Tue May 27, 2003 9:49 pm

How to rename tabs?

Post 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.
-The Velvet TeddyBear-
-aka cYanide-
-cYanidenightmare@hotmail.com-
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post 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  )
Last edited by Berikco on Sat May 31, 2003 4:39 pm, edited 1 time in total.
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1285
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post 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 :)
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

LOL, i use to much API.....never read manuals :D
Post Reply