I want to implement the same kind of List property in a user control as is found in the Listbox control from microsoft. I must be overlooking something in the doc but I can't seem to find any info on the subject. Is it possible to do this?
bigfoot:<br>
<br>
If you are familiar with the properties window of the Listbox control, there is a property called List which provides a dynamic dropdown box of entries which are displayed in the Listbox. I want to duplicate this 'dropdown' functionality in a user control I am creating. I don't want to use a property page for this, i want to duplicate the same capability which is in the Listbox control.<br>
<br>
The documentation says this list is just a string array, but there is no way I can find in a property to pass an array.<br>
<br>
Brucer
have you tried:<br>
For Rep = 1 to Ubound(StringArray)<br>
ListBox.AddItem StringArray(Rep)<br>
Next<br>
Or is this a control of your own creation? Need more data....
Bruce,<br>
<br>
Ok - think I understand now.<br>
<br>
Don't do it with a property - do it with a public method. That way you can duplicated the AddItem method of a standard listbox or have your own AddItems method which accepts an array as a parameter.<br>
<br>
Mike<br>
---<br>
Mike_Lacey@Cargill.Com<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.