[RESOLVED] Combobox style for public properties
I'm creating a user control, and I'd like to know how do you set certain values for a property? For example, boolean values during design time gives you the dropdown with "true" or "false". More specifically I'm using the values in style from a progressbar. I don't know if I'm explaining myself correctly, so imma post a screen shot of waht I meen.
Attachment 91265
Hope y'all get what I'm trying to say.
Re: Combobox style for public properties
Properties that have the dropdown like that are enum types...where there is a defined list of values to select from.
For example, the style of a progress bar is defined "As ProgrssBarStyle" (I'm guessing at the name really, but this illustrates the point) ... which is defined as such:
Code:
Public Enum ProgressBarStyle
Blocks = 0
Continous
Marquee
End Enum
And then the property:
Code:
Private _Style as ProgressBarStyle
Public Property Set Style(Value as ProgrssBarStyle)
_Style = Value
End property
Public Property Get Style as ProgressBarStyle
return _Style
End Property
-tg
Re: Combobox style for public properties
A ha! Thanks tg. I've never use Enum's before :P