Odd ComboBox behavior on resize

前端 未结 3 1008
孤街浪徒
孤街浪徒 2020-12-20 20:25

I have an issue where a ComboBox control will change it\'s Text value when it is resized. Here is some sample code that I worked up:


Option Explicit On  
O         


        
3条回答
  •  一生所求
    2020-12-20 21:10

    Yes, this is a known bug in the native Windows implementation of ComboBox. There's another aspect to this bug. Put a button on your form and give it TabIndex = 0, change the CB's TabIndex to 1. Run it, the button will have the focus. Resize. Note that the ComboBox's text changes as before but now also gets highlighted, as though it has the focus. Even though it hasn't.

    I think this bug has been around since Vista, it didn't get fixed in Win7. There's no known workaround for it.

提交回复
热议问题