Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating control interface
Message
General information
Forum:
Visual Basic
Category:
ActiveX controls
Miscellaneous
Thread ID:
00512378
Message ID:
00512454
Views:
10
Only a comment on that. Be careful to the value received by the Property Let. Even if you have an enumeration with a finite number of items, someone can pass a numeric value directly that is out of the enum.

>>How does one create a dropdown list in the properties window. I have a control with multiple styles and i want to display a dropdown with meaningfull verbage rather than have a box that only accepts numbers hoping the user knows 0 is up, 2 is down...
>>
>>Any help would be greatly appreciated. Thanks in advance.
>
>OK if anyone is interested I have found the answer. Sometimes I believe it helps to ask in a forum as you have to formulate a meaningful question, which helps to clear your head a little. You step back and often a thought occurs and viola, the creative process is restored. This is an answer to my own thread!
>
>
Public Enum MyCoolListOfOptions
>   Left = 0
>   Right = 1
>   Up = 2
>   Down = 3
>End Enum
>
>Private m_eStyle As MyCoolListOfOptions ' establish a mod level var
>
>Public Property Get Style() As MyCoolListOfOptions
>   Style = m_eStyle    ' If asked be able to reply
>End Property
>
>Public Property Let Style(ByVal eStyle As MyCoolListOfOptions)
>    Debug.Print eStyle       ' For testing
>    m_eStyle = eStyle        ' If told be able to assign
>    PropertyChanged "Style"  ' Update property
>End Property
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform