Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TComboBox.AutoCloseUp Property: What does it do?

From the documentations:

Specifies whether the drop-down closes up automatically when the user selects an item.

I have played with this property (combined with AutoComplete and AutoDropDown) and I just can't seem to figure out the UI behavior of this property.

Setting it to True or False I can't see any difference in how it behaves. Can anyone explain to me what it does exactly?

like image 831
zig Avatar asked May 27 '16 07:05

zig


1 Answers

You will see the difference if you have AutoCloseUp = True and also AutoDropDown = True. For example, if you have items '0', '1' and '2' and the ComoBox has focus, when you use the keyboard and press 2 the dropdown list flashes briefly and is closed again with item '2' selected. If you change AutoCloseUp = False, then the dropdownlist remains open (and you can change your selection with the arrow keys) until you indicate your selection with Enter

If you operate the combo only with your mouse, then there's no difference.


Addition after comments

If you add to my example items '22' and 'more' and you also have AutoComplete = True (which it is by default) you will note the following:

item '22' is not selectable with two consecutive hits on 2. It is of course still selectable with the arrow keys, like all other items.

The AutoCloseUp feature closes the dropdown when AutoComplete finds a matching item for all sofar typed keys. If you type m, o, r the list is still open, 'more' selected and the list is finally closed if you type the missing e.

like image 73
Tom Brunberg Avatar answered Oct 22 '22 05:10

Tom Brunberg