Help with custom properties in my own control

  • Thread starter Thread starter André Nogueira
  • Start date Start date
A

André Nogueira

Hi there.
I have my own control and can add properties that are integers or strings or
icons or whatever.
But how can I make a property that only lets the user select a predefined
value?
Like in the Visible property you can't enter your own values, you can just
select True or False.
I'd like to have a property where the user can only select "Value A" "Value
B" or "Value C". I do not want it to be a boolean (as True and False are)
but my custom strings.
Can this be done? How?
Thank you in advance.

André Nogueira
 
* "André Nogueira said:
I have my own control and can add properties that are integers or strings or
icons or whatever.
But how can I make a property that only lets the user select a predefined
value?

\\\
Public Enum Bars
FooBar
GooBar
DooBar
End Enum
..
..
..

Private m_MyBars As Bars

Public Property MyBars() As Bars
Get
Return m_MyBars
End Get
Set(ByVal Value As Bars)
m_MyBars = Value
End Set
End Property
///
 
Back
Top