×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How Do I implement 'List' functionality in a User Control?

How Do I implement 'List' functionality in a User Control?

How Do I implement 'List' functionality in a User Control?

(OP)
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?

RE: How Do I implement 'List' functionality in a User Control?

Can you please give me more information?

RE: How Do I implement 'List' functionality in a User Control?

(OP)
bigfoot:

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.

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.

Brucer

RE: How Do I implement 'List' functionality in a User Control?

have you tried:
For Rep = 1 to Ubound(StringArray)
ListBox.AddItem StringArray(Rep)
Next
Or is this a control of your own creation? Need more data....

RE: How Do I implement 'List' functionality in a User Control?

Bruce,

Ok - think I understand now.

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.

Mike
---
Mike_Lacey@Cargill.Com

RE: How Do I implement 'List' functionality in a User Control?

(OP)
No, Thats not it. I want to be able to do this at Design time, not runtime.

RE: How Do I implement 'List' functionality in a User Control?

Have you loked at Dan Applemans ActiveX Control book? (www.desaware.com)

Mike
---
Mike_Lacey@Cargill.Com

RE: How Do I implement 'List' functionality in a User Control?

(OP)
No I haven't. I'll check it out. Thanks.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close