|
-
Oct 28th, 2006, 01:37 PM
#1
Thread Starter
Junior Member
PropertyGrid, inherit default value
Hi,
Using the PropertyGrid it's easy to change the properties of your classes.
The PropertyGrid shows the values in bold when it's not the Default value specified by the DefaultValueAttribute in the declaration of the property.
VB Code:
<CategoryAttribute("General"), _
Browsable(True), _
DefaultValueAttribute("Monstrosity")> _
Public Property Name() As String
How can the default value be overriden, like the backgroundcolor property of the Control class does, so that the value isn't shown in bold.
E.g.: If you change the background color of a form then, the default backgroundcolor of the panels placed on that form will be changed. (The backgroundcolor-property in the grid will not be shown in bold unless you change the backgroundcolor of the panel into something else than the form's backgroundcolor.)
How can i do that with my own classes? How do i change de default value attribute into something that is not a constant?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|