Author Topic: VB help  (Read 3079 times)

Anonymous

  • Guest
VB help
« on: 2001-09-13 05:49:00 »
Ok this will sound stupid but i cant find my help cd. how do you select what goes on each tab when using tabstrip?

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
VB help
« Reply #1 on: 2001-09-13 15:44:00 »
Tech related question ... I've moved it over.

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
VB help
« Reply #2 on: 2001-09-13 17:54:00 »
That's not that easy...

If you're using the 'normal' Tab Control, you've got to insert a picture box (or another container) for each Tab. Then, when you click on a Tab, you should get the Index of it and make the picture box visible...

Example: You've got a Tab Control called 'Tab1'. You've got 3 Tabs. That means the Index of 'Tab1' is from 0 to 2. Then you create 3 PictureBoxes and make an 'Array' of them. Means: They use the same name and have an Index. Now you've got 3 picboxes: Pic(0 to 2)

Then, when the user clicks on the tab - the procedure 'Tab1_Click(Index As Integer)' (or sth like that) is beeing used.
It's syntax:

code:
Private Sub Tab1_Click (Index As Integer)
Dim X as Integer
  For X = 0 To 2
    'Set all PiBoxes Invisible
    Pic(X).Visible = FALSE
  Next X
  'Set the selected one Visible
  Pic(Index).Visible = TRUE
End Sub
[/quote]

Or another method: You simply use the SSTab control.   :wink:

- Alhexx

- edit -
Hey, drkness, if you had registered, that shit wouldn't happen!  :wink:

[This message has been edited by Alhexx (edited September 13, 2001).]