How to do this (listbox control)
- From: Frank Moyles <fgmoyles@xxxxxxxxxx>
- Date: Thu, 06 Dec 2007 00:50:46 +0000
I am trying to do the following in VB6 for a demo program :
1. I want to display 2 columns in a list box (e.g. 'key', 'description'), so I can display the contents of a std::map (or in VB parlance - a 'dictionary')
2. I want to use a users selection in one combobox, to 'filter' the available selections in another combo box. The 'obvious' way of doing this (storing the entire unfiltered data in some variable/class and then filtering and re-populating the second list, based on selection in first list), seems a bit 'clunky', and I am not yet familiar with VB's classes to know how to improve on this - help is appreciated.
3. I want to match and update (when possible) the item in a listbox, that matches the first typed in letters - AS A USER types text into a text box. basically, I want to supplier a user with a textbox (for data entry), and a list of items. as the user types in text, the first characters typed in used to match entries that begin with the typed characters - all other entries will be removed. This way, the items in the list gradually decreases until only a few or one item remains (in the case of a match). Where there is no match between the users entered characters/text and the items in the list, no list entries will be removed - but maybe a msgbox can be displayed to indicate no match.
I would be particularly be grateful for any code snippets that help clarify the best way to proceed (especically for #3)
.
- Follow-Ups:
- Re: How to do this (listbox control)
- From: Jan Hyde (VB MVP)
- Re: How to do this (listbox control)
- Prev by Date: Re: Chain.NET (a.k.a. NChain) 0.1-beta released
- Next by Date: Re: OFN_FILEMUSTEXIST is a lie?
- Previous by thread: Finding Hisdtorical Stock Prices
- Next by thread: Re: How to do this (listbox control)
- Index(es):
Relevant Pages
|