M
Marty McFly
Hello,
I have a control class that inherits from System.Web.UI.WebControls.Button.
When I drag this control from the "My User Controls" tab in the toolbox onto
the form, I want it to reflect the following default properties: Height =
32px, Width = 144px.
I declare the Width property in my control as...
\\\
<DefaultValueAttribute(GetType(Unit), "144px"), _
DescriptionAttribute("The width of the Cancel button.")> _
_
Public Overrides Property Width() As Web.UI.WebControls.Unit
Get
Return Me.Width
End Get
Set(ByVal Value As Web.UI.WebControls.Unit)
Me.Width = Value
End Set
End Property
///
After building the project, the Width in the Properties pane of the IDE is
disabled and displays the text: "Exception of type
System.StackOverflowException was thrown.".
I also tried to use the following line of code, but it barked about
requiring a constant expression:
<DefaultValueAttribute(Unit.Pixel(144)), _ ...
Does anyone have any ideas? Many thanks!!
Take care,
Marty
I have a control class that inherits from System.Web.UI.WebControls.Button.
When I drag this control from the "My User Controls" tab in the toolbox onto
the form, I want it to reflect the following default properties: Height =
32px, Width = 144px.
I declare the Width property in my control as...
\\\
<DefaultValueAttribute(GetType(Unit), "144px"), _
DescriptionAttribute("The width of the Cancel button.")> _
_
Public Overrides Property Width() As Web.UI.WebControls.Unit
Get
Return Me.Width
End Get
Set(ByVal Value As Web.UI.WebControls.Unit)
Me.Width = Value
End Set
End Property
///
After building the project, the Width in the Properties pane of the IDE is
disabled and displays the text: "Exception of type
System.StackOverflowException was thrown.".
I also tried to use the following line of code, but it barked about
requiring a constant expression:
<DefaultValueAttribute(Unit.Pixel(144)), _ ...
Does anyone have any ideas? Many thanks!!
Take care,
Marty