Link to home
Start Free TrialLog in
Avatar of trondsorensen
trondsorensen

asked on

tabstrip question (VB6)

How do I programicaly select one of the tabs on a tabstrip?
On a sstab I use sstab1.Tab = 2, but I can not find i way to do it
on a tabstrip.
Anybody?
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You need to have two public variables in that form, such as CurrentTab, PrevTab. In the Tabstrip's click event, have code something like this:
In this, you can keep a separate frame for each tabpage. When a tabpage is selected make the specific frame visible and all others invisible.

CurrentTab = Tabstrip1.SelectedItem.Index - 1

If CurrentTab <> PreviousTab then
...   'Do some process like making the frame visible & other frames invisible
...
PreviousTab = CurrentTab
Endif

Hope this would be useful
Regs
Selva
Avatar of trondsorensen
trondsorensen

ASKER

I thought it was that easy, just couldnt figure it out :-)
Thanks.
I am sorry tirupur_selva, but this is not what I was asking. Maybe it is my english wich is not as good as I like to think ;-)
I wanted to select a tab progamicaly, like if I press command1, tab1 gets selected. But thanks for your effort.