M
millerchris40
I created a UserControl that has a MaskedTextBox in it. It works. I
have a BorderStyle property defined as:
<Browsable(True),
DefaultValue(System.Windows.Forms.BorderStyle.Fixed3D),
Description("Indicates whether the EnhancedTextBox will have a
border.")> _
Public Overloads Property BorderStyle() As
System.Windows.Forms.BorderStyle
Get
Return MaskedTextBox1.BorderStyle
End Get
Set(ByVal value As System.Windows.Forms.BorderStyle)
MaskedTextBox1.BorderStyle = value
End Set
End Property
It works fine. However, when I place an instance of this control on a
form, the BorderStyle property is displayed in the Properties Window
of the form in Bold. It's not recognizing the Fixed3D as the default
value. I have other properties that are doing the same thing.
However, some of my properties that I have (Enabled, for example) do
display not in bold when the value of the property is it's default
value:
<Browsable(True), DefaultValue(True), Description("Indicates
whether the EnhancedTextBox is enabled.")> _
Public Overloads Property Enabled() As Boolean
Get
Return MaskedTextBox1.Enabled
End Get
Set(ByVal value As Boolean)
MaskedTextBox1.Enabled = value
TextBox1.Enabled = value
End Set
End Property
Can anyone tell me why?
have a BorderStyle property defined as:
<Browsable(True),
DefaultValue(System.Windows.Forms.BorderStyle.Fixed3D),
Description("Indicates whether the EnhancedTextBox will have a
border.")> _
Public Overloads Property BorderStyle() As
System.Windows.Forms.BorderStyle
Get
Return MaskedTextBox1.BorderStyle
End Get
Set(ByVal value As System.Windows.Forms.BorderStyle)
MaskedTextBox1.BorderStyle = value
End Set
End Property
It works fine. However, when I place an instance of this control on a
form, the BorderStyle property is displayed in the Properties Window
of the form in Bold. It's not recognizing the Fixed3D as the default
value. I have other properties that are doing the same thing.
However, some of my properties that I have (Enabled, for example) do
display not in bold when the value of the property is it's default
value:
<Browsable(True), DefaultValue(True), Description("Indicates
whether the EnhancedTextBox is enabled.")> _
Public Overloads Property Enabled() As Boolean
Get
Return MaskedTextBox1.Enabled
End Get
Set(ByVal value As Boolean)
MaskedTextBox1.Enabled = value
TextBox1.Enabled = value
End Set
End Property
Can anyone tell me why?