A "sub-Property" is simply a
Property
that is also a
Class
or
Structure
.
So having a
Property
such as the following will allow you to call
ClearButton.AllowEnlargeWhenFocus.mSize = 3
Public Class Enlargement
Public Property mSize As Integer
End Class
Public Class ClearButton
Private _enlargement As Enlargement
Public Property AllowEnlargeWhenFocus As Enlargement
Get
Return _enlargement
End Get
Set(Byval value As Enlargement)
_enlargement = value
Me.Resize(value.mSize)
End Set
End Property
End Class
However I do not quite see why this would be necessary.
AllowEnlargeWhenFocus
sounds as though it is a
Boolean
. It seems all your
ClearButton
would need is another
Property
, let's call it
Enlargement
, that is an
Integer
and will be used for resizing when
AllowEnlargeWhenFocus
is
True
.
Having a
Class
(or
Structure
)with just one
Property
like that makes no sense at all, neither does starting a
Property
name with "Allow" and not making it a
Boolean
. Or having a
Public Property
be called
mSize
(
CamelCase[
^] for
Public Properties
and
Methods
is widely accepted as the standard).
Hope that helps you solve your problem :)