Re: How to do this (listbox control)
- From: "Jan Hyde (VB MVP)" <StellaDrinker@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 06 Dec 2007 09:17:06 +0000
Frank Moyles <fgmoyles@xxxxxxxxxx>'s wild thoughts were
released on Thu, 06 Dec 2007 00:50:46 +0000 bearing the
following fruit:
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')
OKm you can do it, but why do things the hard way? Use a
listview or a grid control.
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.
Or store it in a recordset which already has a built in
filter.
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)
Maybe this will help, it seems to be where your heading.
http://vbnet.mvps.org/index.html?code/textapi/shautocomplete.htm
--
Jan Hyde
https://mvp.support.microsoft.com/profile/Jan.Hyde
.
- References:
- How to do this (listbox control)
- From: Frank Moyles
- How to do this (listbox control)
- Prev by Date: Re: Problem selecting checkboxes in TreeView
- Next by Date: Re: Chain.NET (a.k.a. NChain) 0.1-beta released
- Previous by thread: How to do this (listbox control)
- Next by thread: RS232C Communication in VB.NET 2003
- Index(es):
Relevant Pages
|