Combo box style , which one is better 
Author Message
 Combo box style , which one is better

You are a little confused with the style names, Want, but your conumdrum
(a dilemma is different) may be resolved by your knowing that in style
2, the one where you are not allowed to enter text willy-nilly
(technically, DropDownList), it is permissible to set listindex to -1,
which leaves the textbox display 'empty'.
Quote:

> hi,

> when using the combo box, which style suit better ?

> Drop down list ? Drop down combo ?

> When I use drop down list, I afraid user didn't select from the list and key
> in instead. this will cause data type error

> When I use drop down combo, there is no way user to key in and I couldn't
> set combo.text (read-only for drop down combo)
> therefore, when user click the undo button i couldn't clear the combo
> (appear text)
> this also give me a problem when user try to edit a record and want to set
> the combo data to "" (none) , unless i have to
> add a "empty" string in the combo list

> any suggestion to help me out from this dillema



Wed, 30 Jan 2002 03:00:00 GMT  
 Combo box style , which one is better

Quote:
> You are a little confused with the style names, Want, but your conumdrum
> (a dilemma is different) may be resolved by your knowing that in style
> 2, the one where you are not allowed to enter text willy-nilly
> (technically, DropDownList), it is permissible to set listindex to -1,
> which leaves the textbox display 'empty'.

Can I just add to this a method to allow the user to "clear" the selection,
which I think Mr Want requires.

You can let the user do this by pressing the Delete key -- just look for it
in the Combo1_KeyDown event and set Combo1.ListIndex = -1

Bertie
PS Is it OK saying "set = -1" there, Jeff? ;-)



Wed, 30 Jan 2002 03:00:00 GMT  
 Combo box style , which one is better
Ya got me!

I actually went a day and a half once phrasing these responses -
accurately - with 'let', then just gave it up <g>

BUT it's not always trivial - there is another thread where someone
assumed
 (Let) font = "Arial"
was equivalent to
  Set font = <somefont>

BTW, I have a need for your delete-key technique described here and will
be installing it for a half dozen cbo's on Monday.  I hadn't thought of
that - thanks!

Quote:



> > You are a little confused with the style names, Want, but your conumdrum
> > (a dilemma is different) may be resolved by your knowing that in style
> > 2, the one where you are not allowed to enter text willy-nilly
> > (technically, DropDownList), it is permissible to set listindex to -1,
> > which leaves the textbox display 'empty'.

> Can I just add to this a method to allow the user to "clear" the selection,
> which I think Mr Want requires.

> You can let the user do this by pressing the Delete key -- just look for it
> in the Combo1_KeyDown event and set Combo1.ListIndex = -1

> Bertie
> PS Is it OK saying "set = -1" there, Jeff? ;-)



Wed, 30 Jan 2002 03:00:00 GMT  
 Combo box style , which one is better
hi,

when using the combo box, which style suit better ?

Drop down list ? Drop down combo ?

When I use drop down list, I afraid user didn't select from the list and key
in instead. this will cause data type error

When I use drop down combo, there is no way user to key in and I couldn't
set combo.text (read-only for drop down combo)
therefore, when user click the undo button i couldn't clear the combo
(appear text)
this also give me a problem when user try to edit a record and want to set
the combo data to "" (none) , unless i have to
add a "empty" string in the combo list

any suggestion to help me out from this dillema



Thu, 31 Jan 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Help: Combo Box, Style 1 (Simple Combo), BackColor

2. Combo Box help, need a better combo

3. combo box style 1 and database

4. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

5. Selecting in VB Combo Boxes (Style 0)

6. Combo box style : change setting in code

7. Combo Box - Style 2

8. Access Style Combo Box

9. Combo Box - Initialize Style 2 Type?

10. Setting Combo Box Style Property At Runtime???

11. CoMBo box style, but with piCTures ?

12. Default Values for Combo Box Style 2

 

 
Powered by phpBB® Forum Software