I have defined a propertygrid calling standard system colour resources. The problem is that I can't figure out how to make the propertygrid on runtime to select the colour red, I have tried entering the following into the defaultvalueattribute on the propertygrid.
See code below:
The problem is that it just runs the code and the colour property just keeps saying None.
Any ideas?
Cheers
Simon
See code below:
Code:
Private _colour As System.Drawing.Color
<CategoryAttribute("Colour"), _
DefaultValueAttribute("Red"), _
DescriptionAttribute("Select a colour")> _
Public Property Colour() As System.Drawing.Color
Get
Return _colour
End Get
Set(ByVal Value As System.Drawing.Color)
_color = Value
End Set
End Property
The problem is that it just runs the code and the colour property just keeps saying None.
Any ideas?
Cheers
Simon