<System.ComponentModel.Browsable(False)> almost does what I need

A

active

I have the following in a usercontrol.

When I site the control on another usercontrol the designer adds

Me.RichEditControl1.TxtSelectedText = Nothing

which causes an error in the Property.

Is there anything I can do to convince the Designer to either set it to ""
or better still ignore it.



Cal

PS The properties do not show in the property grid as expected



<System.ComponentModel.Browsable(False)> _

Public Property TxtSelectedText() As String

Get

TxtText = RichTextBox1.SelectedText

End Get

Set(ByVal NewText As String)

RichTextBox1.SelectedText = NewText

End Set

End Property
 
H

Herfried K. Wagner [MVP]

* " active said:
I have the following in a usercontrol.

When I site the control on another usercontrol the designer adds

Me.RichEditControl1.TxtSelectedText = Nothing

which causes an error in the Property.

Which error?
 
A

active

I put some test in that fixed(really worked around) the problem so I'd have
to recode to get the exact error words but it's the error that we get if the
variable points to Nothing instead of an object.

If you think it would help I could get the exact message with a little work.

It would be worth it if you think we could get the designer to not
generating code for that property.

Think it would help to have the exact words?

Tell me this: If the property is
<System.ComponentModel.Browsable(False)>
I know it should not appear in the Properties grid,
but should the designer initialize it?

Thanks
Cal
 

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

Top