I've had limited experience with classes and had a lot of help with my last one that inherited from a panel. I didn't have any special properties. Now what I need is a special label class. There a lot of ways I could do this rather than a label (some likely better), but what I want in this instance is a label that has extra properties. Basically it is a special label to hold file information. The .Text property from the basic label will hold the file name (as only the name has to be displayed), but then I need directory info of where the file was found, maybe the size, and then anything else I decide. The final result is multiple of these "flabel" will be in a collection and I will always be dealing with these collections.
Here is the code so far:
My problem is I cannot use the Properties it Inherited from the base Label (i.e. .Name, .Text, etc). What am I doing wrong?
-I hate Microsoft!
-Forever and always forward.
Here is the code so far:
Code:
Public Class flabel_class
Private nDirectory As String
Private nFileSize As Long
Public Sub New()
MyBase.New()
InitializeComponent()
End Sub
Private Sub InitializeComponent()
End Sub
Protected Overrides Sub Finalize()
End Sub
Public Property Directory() As String
Get
Return nDirectory
End Get
Set(ByVal value As String)
nDirectory = value
End Set
End Property
Public Property FileSize() As Long
Get
Return nFileSize
End Get
Set(ByVal value As Long)
nFileSize = value
End Set
End Property
End Class
My problem is I cannot use the Properties it Inherited from the base Label (i.e. .Name, .Text, etc). What am I doing wrong?
-I hate Microsoft!
-Forever and always forward.