vcl combobox doesn't always show that it has focus

后端 未结 2 1375
闹比i
闹比i 2021-01-27 01:05

When I tab from another control to a combo box it shows the box with a dotted line around the text, but when I set the control to be active programmatically, it doesn\'t show th

2条回答
  •  故里飘歌
    2021-01-27 01:34

    To make the focus rectangle appear on a combo box, when setting the focus programmatically, you can use the following code:

    ComboBox.SetFocus; 
    ComboBox.Perform(WM_SYSKEYDOWN, VK_TAB, 0); 
    

提交回复
热议问题