|
-
Dec 4th, 2001, 07:33 PM
#1
Thread Starter
PowerPoster
Listbox OCX Help
I am trying to create a listbox ocx. I have everything down except for how to create the .List .Listindex .Index functions. Can anyone fill me in on how to create these functions?
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

-
Dec 4th, 2001, 07:57 PM
#2
PowerPoster
Not without knowing how you designed you listbox.
If you used an array as the storage for the listbox, then
.List(i)would be Array(i).
.ListIndex would be i
.Index is not something you need to create yourself, it's a project thing to reference a control array. You just need to set the control to MultiUse or something - I forget what the setting is...
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Dec 4th, 2001, 08:06 PM
#3
Thread Starter
PowerPoster
Hi, thanks. I havent used anything for the storage of the listbox. How do i set that up?
Right now the listbox adds things like this.
Sub Additem(Item As String)
UserControl.Print Item
End Sub
AS far as keeping the items in an array i dont know how to impliment that.
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

-
Dec 4th, 2001, 08:07 PM
#4
PowerPoster
So how are you making a listbox then???
Where is the list???
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Dec 4th, 2001, 08:09 PM
#5
Thread Starter
PowerPoster
The list is printed on the Usercontrol using the print command.
My whole point of this thread was how do i keep track of the list using Listindex ect.... If i knew how to do that i wouldnt have written the post.
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

-
Dec 4th, 2001, 08:13 PM
#6
PowerPoster
And I told you, I really don't know how you're making a list.
What does it do? Just print a line onto a box?
I really think you need to use an array to store the data in the list.
Or else you can't have a .ListIndex or a .List. You just have alot of text. Which you could reference by it's location on the control, I guess, but that's a bit silly, and wouldn't work very well for a big list.
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|