By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,534 Members | 950 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,534 IT Pros & Developers. It's quick & easy.

Help with custom properties in my own control

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
* "André Nogueira" <an**@netcabo.pt.NOSPAM> scripsit:
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
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
<URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.