Inserting data into combo box with style 2 - drop down list 
Author Message
 Inserting data into combo box with style 2 - drop down list

I need to force the user to select from the drop down list rather than
just type in text, so I set the combo box's style to "2 - drop down
list". The problem I now have is that I also need the application to be
able to load values into the text area at the top of the combo box.
Style 2 won't allow it, and I can't convert back to style 0 at run time.

Anybody know a way around this, or a third party control that allows the
app to insert text but not the user?

Thanks



Sat, 30 Jun 2001 03:00:00 GMT  
 Inserting data into combo box with style 2 - drop down list
Why don,t you just use normal style, which allows the user to enter text
and with the help of  keypress event lock the user when required.
I know I worked around in my apps like this but this is really a round about
way.
Quote:

> I need to force the user to select from the drop down list rather than
> just type in text, so I set the combo box's style to "2 - drop down
> list". The problem I now have is that I also need the application to be
> able to load values into the text area at the top of the combo box.
> Style 2 won't allow it, and I can't convert back to style 0 at run time.

> Anybody know a way around this, or a third party control that allows the
> app to insert text but not the user?

> Thanks



Sun, 01 Jul 2001 03:00:00 GMT  
 Inserting data into combo box with style 2 - drop down list

Quote:

>I need to force the user to select from the drop down list rather than
>just type in text, so I set the combo box's style to "2 - drop down
>list". The problem I now have is that I also need the application to be
>able to load values into the text area at the top of the combo box.
>Style 2 won't allow it, and I can't convert back to style 0 at run time.

>Anybody know a way around this, or a third party control that allows the
>app to insert text but not the user?

When you say "load values into the text area" are you talking about loading
values that aren't on this list and that you don't want to be on the list or
simply placing values that are in the list into the text area?

The first method looks like it would be very confusing to the user. If this
is what you want to do, perhaps it would help to post some background on why
your app needs to do this. There's probably a better way to implement it.

However, if all you want to do is place a value into the text area which is
in the list, all you have to do is set this ListIndex property to that
entry. For example, if you had a list that had the following items...

Apples
Oranges
Grapes

...and you wanted "Oranges" to be displayed after the combo was loaded, you
would simply set the ListIndex property...

    cboFruits.ListIndex = 1

...(note that combo's are 0 based). This would cause the word "Oranges" to
be displayed in the text area.

Frank Carr



Sun, 01 Jul 2001 03:00:00 GMT  
 Inserting data into combo box with style 2 - drop down list
My company has developed a few nice 32-bit ActiveX Controls and one of them
is a combo box with functionalities like:

AutoSearch
LimitToList
On NotInList Event
Etc...

If your interested in this, you can download the free evaluation control at:
http://www.atdsystems.com/vb_components/atdcomboeval.exe

If your interested in any of our other controls, please feel free to check
them out at:
http://www.atdsystems.com/what_we_do/vb.htm

Quote:

>I need to force the user to select from the drop down list rather than
>just type in text, so I set the combo box's style to "2 - drop down
>list". The problem I now have is that I also need the application to be
>able to load values into the text area at the top of the combo box.
>Style 2 won't allow it, and I can't convert back to style 0 at run time.

>Anybody know a way around this, or a third party control that allows the
>app to insert text but not the user?

>Thanks



Sun, 01 Jul 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Please help on Combo with style Drop Down List - Urgent

2. Drop Down List Box - Drop Down portion does not always disappear after Click event

3. Creating Drop down lists (non combo boxes) in VB5 Toolbar

4. Make Combo or list boxes drop down????

5. Modify the Width of the Drop Down List in a Combo Box

6. Combo box with Multiselect (drop down list with multiselect)

7. HELP: Combo Box Drop Down List Questin, Thanks in advance

8. Making Combo-List Box drop-down automatically

9. Drac's questions on drop down lists in combo boxes

10. how to drop down a combo box list (newbie)

11. Using Data Combo as Drop Down List ?

12. Drop Down Combo box with smaller down arrow icon

 

 
Powered by phpBB® Forum Software