Constituent Controls and Design Time

J

Jim-M

I'm inheriting TextBox in my custom control...it has a property that is
type TextBox and will point to two other TextBox controls on the form.

This is working correctly, however at design time, the Property Browser
displays a "+" sign when the property is set to a control other than
(none). This toggles the detail of the TextBox that the property value
points to.

Is there an attribute I can apply to the property declaration that will
control whether this little plus-minus detail is available at design
time in the Property Browser? It would be inappropriate in my case to
be able to modify the underlying properties of the control pointed to by
the property, as this control is
always available at design time.

I've declared the property as such:

<DesignerSerializationVisibility(DesignerSerializationVisibility.Visible
)> _
Public Property StateTextBox() As TextBox
Get
Return _StateTextBox
End Get
Set(ByVal Value As TextBox)
_StateTextBox = Value
End Set
End Property
Private _StateTextBox As TextBox
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top