Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tabless TabStrip
Message
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00850262
Message ID:
00851212
Views:
14
>>>Is there any way to remove the tabs from a TabStrip control?
>>>
>>>I want to create a page sequence controlled by navigator buttons.
>>>
>>>I'm using VB6. I can do it in .NET but cannot find out how in VB6 (client constraints prevent me using .NET).
>>>
>>>TIA,
>>
>>You can create the facade of this through frames. You can make your pages as you want them to appear. After you get the first one done use the property sheet to move the sheet off the left of the form. I use the following. Add two command buttons (cmdPrevious and cmdNext) and an assortment of frames with sequential numbers in the .tag property. these numbers will be your page order. You could hard code the framenames but this allows reordering and additions.
>>
>>
>>' Begin form code
>>Option Explicit
>>
>>Private m_iPage As Integer    ' This is an integer to indicate current page
>>
>>Private Sub SetFrames()
>>    If Not SetFrame Then
>>        SetFrame
>>    End If
>>End Sub
>>
>>Private Function SetFrame() As Boolean
>>    Dim FraFound As Boolean
>>    Dim fra As Frame
>>
>>    For Each fra In Me.Controls
>>        On Error GoTo bAIL
>>        If Val(fra.Tag) = m_iPage Then
>>            fra.Move 15, 15 ' move is faster than .left etc.
>>            FraFound = True
>>            fra.Caption = "tag " & fra.Tag
>>        Else
>>            fra.Move ((-100) - (fra.Width)), 15
>>        End If
>>    Next
>>bAIL:
>>
>>    If Not FraFound Then
>>        m_iPage = 1   ' We obviously went over or under
>>    End If
>>    SetFrame = FraFound ' Return
>>
>>End Function
>>
>>Private Sub cmdNext_Click()
>>    m_iPage = m_iPage + 1
>>    SetFrames
>>End Sub
>>
>>Private Sub cmdPrevious_Click()
>>    m_iPage = m_iPage - 1
>>    SetFrames
>>End Sub
>>
>>Private Sub Form_Load()
>>    m_iPage = m_iPage + 1
>>    SetFrames
>>End Sub
>>'End form code.
>>
>>
>>I realize there are limitations to this method, however, it does meet the need.
>
>Thanks for your suggestion. However, I've done what I need in VFP (such a simple limitation prevents me using VB).
>
>Wouldn't your solution work better if you had a frame array? This would negate the need to use the .Tag property and For Each (just use the item number - frame(n) and make all the others invisible).
>
>I may just embark on this method - I don't really want to use VFP as I don't need the data engine.
>
>Thanks,

That is a great idea also. Provided, you dont want to modify the order of your wizard/tabstrip.

Glad it helps a little,
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Previous
Reply
Map
View

Click here to load this message in the networking platform