Sunday, August 25, 2002
Don't know if anyone has reported this yet, but the .NET ComboBox class has a bug that prevents the user from using the mouse to select the text in a combo box. (Initial version of the .NET framework, SP2.)
Steps to reproduce: Create a new form. Place a combo box on it. Now run the program. Enter some text into the combo. Now try selecting a part of the text using the mouse. No workie.
Cause: I didn't dig in too deeply into the code of the combo box, but it seems that in order to fire mouse events the ComboBox class captures the mouse input of the edit box. Unfortunately, it forgets to pass those mouse messages to the edit box.
Workaround: I don't have one. I could listen to mouse events and then send the edit box messages when they happen, but that would probably break when Microsoft fixes this bug. The best bet seems to be writing a new combo box wrapper, but I still haven't gotten around to doing that.
1:07 PM
Content of this site is © Dejan Jelovic. All rights reserved.