In vb4 this was easy you'd right-click it and click edit. I now have vb5 and this is not the case. How can I add buttons, labels, textboxes, etc. to a tabstrip.
Printable View
In vb4 this was easy you'd right-click it and click edit. I now have vb5 and this is not the case. How can I add buttons, labels, textboxes, etc. to a tabstrip.
Notice how most of them stay on bottom of the tabstrip?
Place a picture on there and place the objects in the picturebox.
I don't think you get what I mean.
say you have the tab strip:
_________ __________ __________
( tab1 | tab2 | 3 )_______________
| |
| |
| [text1] [command1] | | |
| |
| |
| |
|_______________________________________________|
When you click on each tab the information where I put the text1 and command1 changes to what you specify at design time, I can't figure out how to do this. I did it in VB4 but now in VB5 is isn't working.
Use a Frame control not a picture box..too much memory....and try this:
'Hide all tabs except 1st for startup
For i = 1 To 6
Frame1(i).Visible = False
Next i
This leave Frame(0) Visible..
Then use this to change tabs:
Private Sub TabStrip1_Click()
Dim ii As Integer
Dim tabcheck As Integer
tabcheck = TabStrip1.SelectedItem.Index
For ii = 0 To 6
Frame1(ii).Visible = False
Next ii
Frame1(tabcheck - 1).Visible = True
End Sub
Set all your controls in your Frame() Control Array...
Hope it helps....took me 3 weeks to figure this simple stuff out?!?!?!
or when you draw it, draw it on the tab, and if you're coping and pasting, select the tab first, then paste it
hope this helps :)
I found with my VB5 there were two kinds TAB components one offered containers for the tabs and the other didn't - making one lighter than the other.
DocZaf
{;->
if your using the one without then use frames like MIKEF sez
Single click the control you want, then manually draw it on the Tab. If you double click it is not "contained" within the tab.:(
Painful and time wasting, but can kind of see the logic where you have tabs and controls outside of the tab on the form.
Your using the tabstrip control in the commoncontrol in vb4 you were using the mstab control they are completly different... one is a standalone.. the one you wish to use is a standalone ocx.. search for it under the components list you will see it..
Its called "Microsoft Tabbed Dialog Control" thats what you want to use!
it's the SSTab that you are looking for?? It's much easier to manipulate and set contents of the individual tabs as opposed to the tabstrip control.
All the best.
But how can you load a new control from a control array (for instance a text box, Text1(i)) and but it on a specified tab? I've tried around with container and stuff, but I haven't got it to work.
I would like to be able to load a new tab, load a textbox from a control array and put the textbox on the tab.
If you have a good code example, please post it.
Thanks,
Pentax
Just posting to get it on the top again.
Please, help!
Pentax