Two in one i guss

I have a list box and a text box, i would like to set the list box and the text box up to function in a similer manner to the combobox. So if for example the list box was a list of words sorted and i started to type the work play into the text box i want to scrol the list box to the p section and the the pl section and so on. Any ides on how to do this. The second part of the question is to do with the first list box, i would like to set the tool tip text to the same as what the mouse is over at the time. Any help will be great, i have vb6 if that helps.
kplonkAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vettrangerCommented:
Go to the following site and get to the draglist control. It has a quick search method that does what you want with the first part of your question. This will be much better than the alternative, which would be to loop thru your list matching the contents of the textbox to items in your list using the length of the textbox text.

http://www.mvps.org/ccrp/
0
vettrangerCommented:
Then, add the following code to the mousemove event of the above listed draglist control to get the 2nd part of your answer.

Dim item As Integer
item = ccrpDragList1.TopIndex + (Y / ccrpDragList1.ItemHeight)
ccrpDragList1.ToolTipText = ccrpDragList1.Contents(item)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kplonkAuthor Commented:
thanks this worked great
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

vettrangerCommented:
Happy to help! :-) It just struck me on the 2nd part. After you computer item, compare it to the listcount property of the list box (and probably listcount-1) before setting the tooltip. Altho I didn't try that, it might be possible to get a number greater than a valid index into the Contents collection if the listbox is only partially filled and the mouse moves into the empty area below the list.
0
kplonkAuthor Commented:
yes you can but this is no proble as i have sorted it with a simple error handler, all is well thanks a lot see you later.
0
vettrangerCommented:
Well done :-)
0
kplonkAuthor Commented:
Hello vettranger, i have a question for you i will give you some points if you are able to help. I would like to make the list control tht you sujested to me do a few more things, for example if i was on item 10 of 40 in the list and all 40 were displayed, when i press the page down key i would like to make the box scrol so that item 10 was now on the top of the list box. I would like to make the sam thing happen for the page up key. any ideas
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.