I have a control that extends the ComboBox object. It updates the selected item based on what the user enters in the text area.
In the OnLeave开发者_运维问答 event of the combobox, the selected index is set to the proper item. However, when accessing its selectedindex later it has reverted to the previous value. The selectedindex value is always one behind what it should currently be when accessed outside of the combobox.
Any help would be much appreciated.
I would be glad to provide code and further info if that would help better describe the issue.
Debug it and put a break where you set the selected index and one where you are accessing it, i would bet money it is running the acccessing code FIRST then the setting code. Post your code and we may be able to provide a solution.
精彩评论