Odd ComboBox behavior on resize

前端 未结 3 995
孤街浪徒
孤街浪徒 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:06

    When the form loads, ComboTest gets executed, and you see a '6', however when you resize it does not show the new data, sounds like you need to refresh the combo box, regardless of the resize or not.

    Try uxComboBox.Refresh() immediately after the line uxComboBox.Items.AddRange.

    And after the line 'ComboTest', set the selected index to 0 uxComboBox.Index = 0 also.

    Hope this helps, Best regards, Tom.

提交回复
热议问题