1

I have not been able to figure out why I am unable to manually scroll through a TComboBox component when I programatically cause the drop down pick list to appear. Here is the code I am using:

SendMessage(ComboBox1.handle, CB_SHOWDROPDOWN, Integer(True), 0);

This causes the drop down pick list to appear. However, if I try to use my keyboard and use the up and down arrow keys, the drop down pick list immediately closes. How do I keep the list from auto-closing when using the keyboard up/down navigation keys?

4

1 回答 1

5

激活组合框。而且您最好使用该DroppedDown属性,它也会使组合框无效以反映更改。

ActiveControl := ComboBox1;
ComboBox1.DroppedDown := True;
于 2013-06-21T20:29:18.830 回答