Property in Property Bar

S

Scott Meddows

How do I make a property of a user control show up in the property window in the form designer?

Thanks
Scott
 
C

Chris Dunaway

How do I make a property of a user control show up in the property window in the form designer?

Thanks
Scott

Add the Browseable(True) attribute to the property. For example:

<Browsable(True)> _
Public Property Whatever As Integer
'property implementation here
End Property
--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 
H

Herfried K. Wagner [MVP]

* "Scott Meddows said:
How do I make a property of a user control show up in the property window in the form designer?

\\\
<Browsable(True)> _
Public Property...
...
End Property
///
 
S

Scott Meddows

Thanks a lot!

For bonus points, can I just as easily put it into it's own group?

Chris Dunaway said:
How do I make a property of a user control show up in the property window in the form designer?

Thanks
Scott

Add the Browseable(True) attribute to the property. For example:

<Browsable(True)> _
Public Property Whatever As Integer
'property implementation here
End Property
--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 
C

Chris Dunaway

For bonus points, can I just as easily put it into it's own group?

Yes, just use the Category attribute. And before you ask, YES you can also
have a description appear in the help pane of the PropertyGrid:

<Browsable(True), _
Category("Category Name"), _
Description("This is the help text for this property")> _
Public Property Whatever As Integer
'...
End Property

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 

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