-
How do you placed objects on a TabStrip? It seems that I can get the SSTab
to work but I want to use the TabStrip.
When I try and place objects on the TabStrip, it does not bind to the TabStrip. In other
words, when you click on another tab, the object that I though was on the first tab,
is still there...
Also, during design time, I can't figure out how to move through the different tabs.
The SSTab allows you to simply click on the tab that you want to move to. But the TabStrip
does not move to any tabs when you click on a tab.. What's going on?
Dan
-
Never used SSTAB but
On the other tab, I used the SELECTED to detrmine which tab the user selected at runtime. In my program, there is a DBGRID which displays records based off which tab was chosen.
I don't know if this helps, but it's worth a shot.
-
I think you misunderstood my question.. I'm trying to use the TabStrip, not the SSTab...
-
OK on the TABSTRIP control:
What I was saying is that all of your objects must be the same.
In my example I have 3 tabs Named A,B,C
When a user clicks on A, which is determined by using
TABSTRIP1.SELECTEDITEM.CAPTION <-in my case,
it loads 1 based partnumber into be DBGrid.
There is only 1 dbgrid on the tabstrip which changes as the user selectes the TABS.
Is this more clear, or am I making it worse?
-
I use Picture Boxes (picTabContainer) as a control array with the following code:
'Number of tabs
Const NumberofTabs = 3
Private Sub Form_Load()
Dim refilst As Object
Dim fnum As Integer
Dim i As Integer
Dim value As String
Set tabstrp.ImageList = ilstabpictures
tabstrp.Tabs.Clear
Set reftbs = tabstrp.Tabs.Add(, , "Tab1", 0)
reftbs.ToolTipText = "Tab1"
Set reftbs = tabstrp.Tabs.Add(, , "Tab2", 0)
reftbs.ToolTipText = "Tab2"
Set reftbs = tabstrp.Tabs.Add(, , "Tab3", 0)
reftbs.ToolTipText = "Tab3"
For intX = 1 To NumberofTabs
With picTabContainer(intX)
.BorderStyle = 0
.Left = tabstrp.ClientLeft
.Top = tabstrp.ClientTop
.Width = tabstrp.ClientWidth
.Height = tabstrp.ClientHeight
.Visible = False
End With
Next intX
tabstrp.Tabs(1).Selected = True
picTabContainer(tabstrp.SelectedItem.Index).Visible = True
Hope this helps
Spud
-
you must use containers with tabstrip. I much prefer the SSTAB. The picture box idea is the way to do it.