Combo Box or List Box 
Author Message
 Combo Box or List Box

I have a requirement to combine the functionality of a combo box and a
list box. Neither appears to quite fill the gap.

Here's the problem:

I need to present a list from which items can be selected for deletion
or new items inserted. The list can be very long and the items will only
differ slightly in the last characters. As a result, it is also
necessary to be able to type the value of an item and hence select that
item in the list. So far so good. All of this can be provided by a combo
box set to simple style.

The difficulties begin with the additional requirement to select
multiple items in the list. This does not appear to be possible with a
combo box. (Please tell me I'm wrong!!)

My initial thought was that this could be overcome using a listbox and
an edit box to simulate a combo box, though with the additional ability
for multiple selections provided by the list box.

Sadly, this did not work as setting the ListIndex property does not seem
to give the appropriate result when Setting MultiSelect to anything
other than None.

I'm at a dead end. Any thoughts would be very, very welcome.

BTW I'm using 16bit VB4.

Thanks in anticipation...
--
Allyn J. Carter,  |  Hey Joe,
Birmingham,       |  Where you going with that dogma in your head?
UK.               |  You can prove your point,
                  |  But your kids will still be dead.
                  |    - Roger Waters
_______________________________________________________________________________



Mon, 30 Aug 1999 03:00:00 GMT  
 Combo Box or List Box

How about using a combination of both?

Use the combo box to type and retrieve entries.  When selected, remove the
combobox entry and append it to a listbox.  Then if you select and
double-click on a listbox entry, it would move it back to the combo box.
The combobox would be sorted (otherwise, the partial text feature you are
relying upon would be unpredictable), but the list box would not.

Just a thought.  You are correct in that a combo box cannot be
multiselectable (though you could trick it by altering the listentry that
you select by putting parentheses around the text, then collecting them
when completed).

Just a couple of thoughts off the top of my head.
--
Kevin Nechodom
NurseWare



Quote:
> I have a requirement to combine the functionality of a combo box and a
> list box. Neither appears to quite fill the gap.

> Here's the problem:

> I need to present a list from which items can be selected for deletion
> or new items inserted. The list can be very long and the items will only
> differ slightly in the last characters. As a result, it is also
> necessary to be able to type the value of an item and hence select that
> item in the list. So far so good. All of this can be provided by a combo
> box set to simple style.

> The difficulties begin with the additional requirement to select
> multiple items in the list. This does not appear to be possible with a
> combo box. (Please tell me I'm wrong!!)

> My initial thought was that this could be overcome using a listbox and
> an edit box to simulate a combo box, though with the additional ability
> for multiple selections provided by the list box.

> Sadly, this did not work as setting the ListIndex property does not seem
> to give the appropriate result when Setting MultiSelect to anything
> other than None.

What are you trying to accomplish by ListIndex?


Tue, 31 Aug 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Combo box spawning list box

2. adding to a combo box or list box

3. pls help : COMBO box or list box

4. How could I combine the features of combo box and list box

5. Urgent: Combo Box and List Box Properties

6. Combo Box - Setting list box height

7. MatchEntry property problem on combo box and list box

8. Combo Boxes...or list boxes...

9. dialog box with list box or combo box

10. Limiting Access to Text Boxes, List Boxes and Combo Boxes

11. How to list macro names in a combo box or a list box

12. Examples of OwnerDrawn for Combo Box / List Box / Menu / Toolbars

 

 
Powered by phpBB® Forum Software