On a form with many listboxes, I got annoyed with the way the form looked (it looks like a zebra) after selections have been made in most of the listboxes. Any selection in the listbox causes that line to be black, and the only way back from that is programmatically un-selecting the line.
So I wrote a simple piece of code to the listboxes' lostfocus event that unselects the line in the listbox. However now whenever I click on another control, thus shifting the focus, the first click almost never counts. I have to click again for the focus to move. As if the first click is consumed by the lostfocus event of the relevant listbox.
I had to remove all such code but that's not exactly ideal for me. What kind of operations is the lostfocus event good for anyway?
So I wrote a simple piece of code to the listboxes' lostfocus event that unselects the line in the listbox. However now whenever I click on another control, thus shifting the focus, the first click almost never counts. I have to click again for the focus to move. As if the first click is consumed by the lostfocus event of the relevant listbox.
I had to remove all such code but that's not exactly ideal for me. What kind of operations is the lostfocus event good for anyway?