Custom Tab Control

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
1 post Page 1 of 1
Contributors
User avatar
M1z23R
VIP - Donator
VIP - Donator
Posts: 622
Joined: Tue Sep 28, 2010 4:55 pm

Custom Tab Control
M1z23R
So, i am making Completly custom tab control, so far i am able to draw tabs and navigate through tabs, but i am trying to make TabPages Property, i\ve found something, but idk why does it change each time i debug - it \forgets\ all the items.

I made another class TabPageCollection
Code: Select all
Public Class TabPageCollection
Inherits CollectionBase

 Public Sub Add(ByVal tb As iTabPage)
        List.Add(tb)
    End Sub

    Public Sub Remove(ByVal index As Integer)
        If index > Count - 1 Or index < 0 Then
            Console.WriteLine("Can't add this item")
        Else
            List.RemoveAt(index)
        End If
    End Sub

    Default Public ReadOnly Property Item(ByVal index As Integer) As iTabPage
        Get
            Return CType(List.Item(index), iTabPage)
        End Get
    End Property
End Class

Public Class Form1

Private _TabPages as TabPageCollection
Property TabPages As TabPageCollection
Get
return(_tabpages)
End Get
Set (ByVal Value as iTabPage)
_TabPages = value
End Set
End Property

End Class
How do i make this work ?
1 post Page 1 of 1
Return to “Coding Help & Support”