Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to stop combo box being highlighted in Win2000

Status
Not open for further replies.

gcarolan

Programmer
Jun 18, 2002
36
IE
Hi,

I have a combo box on a MhTab Control. I want to be able to input details as well as use it as an ordinary combo box. The problem is after filling a combo box, clicking on the next tab filling the combo box there when I go back to the first tab the input in the combo box is now highlighted which I don’t want. This only occurs in Windows 2000 and not in Windows 95 or 98. Is there a property or a way around this problem?

gcarolan
 
When you switch from tab to tab, the focus moves from a control on the prior tab to one on the new tab. When you go back, the focus shifts back to a control on the old tab. Often when a combobox gets the focus, it highlights the selected item. In fact, I'm surprised that it doesn't do this on 95/98.

I haven't tried this, but I suspect that you could could do a couple of things. One, you could have the focus go to a different control when you return to that tab. That would eliminate the highlight in the combobox, but it would put the focus on a different control. Another thing you could probably do (if you want the focus on the combobox) is to use SelStart and SelLength to eliminate the highlight. I'm not positive that works, but it shouldn't take too long to give it a shot. BlackburnKL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top