Re: How to do this (listbox control)



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
.



Relevant Pages

  • How to do this (listbox control)
    ... so I can display the contents of a std::map ... 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. ... 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. ...
    (microsoft.public.vb.general.discussion)
  • Re: How to open call log form through code??
    ... to filter by Incoming, Outgoing or Missed calls. ... Did you get any API to display the call logs as it is in WM 5.0 default ... display those entries as they are shown by the WM 5.0 default behaviour. ...
    (microsoft.public.pocketpc.developer)
  • Re: Multiple Combo Box Filter
    ... but then have several boxes to limit the entries. ... newly created filter display there. ...
    (microsoft.public.access.forms)
  • Re: Custom Filter for ending numbers
    ... of numbers and letters. ... characters and then sort the list to get all the numbers together and all ... Any further thoughts on either a custom or advanced filter? ... post and in some of the entries where I have the mix of letters and ...
    (microsoft.public.excel.misc)
  • Re: How do I add a folder to the Address Book?
    ... That's a great way to display only my wanted contacts but is there no ... those contact entries, instead of every contact in my Address Book, so ... select it to display the Quick Filter. ... containing two dropdown menus and an "X" arrow button.) ...
    (microsoft.public.mac.office.entourage)