Data Driven Tabstrip without SmartObjects

xjm

New Member
I suspect I know the answer to this but hopefully I'm wrong.

Is there any way to create a data driven ocx tabstrip without the use of SmartObjects? Basically I want to create procedures with each tab section then when program "A" calls the program I display tabs 1, 2 & 3 and if program "B" calls it I display tabs 1, 3, 4 & 5.

Any ideas?

Thanks in advance.
 
Hi, you can remove a tabstrip tab by calling the remove method:
chCtrlFrame:TabStrip:tabs:remove(tabIdx).

Where tabIdx is the (one-based) index of the tab you don't want displayed. I'm assuming you're using the microsoft tabstrip that comes in comctl32.ocx...
Hope that helps!
--------------------------------------------------------------------------

xjm said:
I suspect I know the answer to this but hopefully I'm wrong.

Is there any way to create a data driven ocx tabstrip without the use of SmartObjects? Basically I want to create procedures with each tab section then when program "A" calls the program I display tabs 1, 2 & 3 and if program "B" calls it I display tabs 1, 3, 4 & 5.

Any ideas?

Thanks in advance.
 
Thanks!

Thanks to everyone that responded here and in the peg. Here is the code I was looking to create:

def var nn as int.
def var jjj as handle.

Adding a tab:
jjj = chCtrlFrame:tabstrip:tabs:add(chCtrlFrame:TabStrip:Tabs:count + 1,
"mytab" + string(chCtrlFrame:TabStrip:Tabs:count + 1),
"NewTab #" + string(chCtrlFrame:TabStrip:Tabs:count + 1)).

Removing the last tab:
jjj = chCtrlFrame:tabstrip:tabs:remove(chCtrlFrame:TabStrip:Tabs:count).

Changing the tab label (if I know the tab# and it's NOT resorted):
chCtrlFrame:TabStrip:Tabs:item(1):caption = "newtext"

Changing the tab label (If I don't know where the tab was placed but know the key):
repeat nn = 1 to chCtrlFrame:TabStrip:Tabs:count:
if chCtrlFrame:TabStrip:Tabs:item(nn):key = "KnownTabKeyName" then
chCtrlFrame:TabStrip:Tabs:item(nn):caption = "newtext".
end.

Thanks everyone! :D
 
Back
Top