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:
00512470
Views:
8
Excellent point. I will have to go and test that out. No doubt Something will need to be changed. :)

>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
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform