Resizing combo boxes
- From: "Ivo" <ivo>
- Date: Mon, 15 May 2006 20:45:36 -0700
Hi
I'm having a weird problem with a dropdown combo box (not a dropdown list).
Lets say I have a dialog box with a combo box in it. If the dialog box is resized I resize the combo box to fit the width of the dialog. If the text in the box matches one of the choices in the list, the text is selected every time the control is resized. If the text doesn't match any of the choices then it is not selected. This happens no matter if the control has the focus or not.
The result is that if I have multiple combo boxes, then when the dialog is resized all of the texts get selected and it is hard to figure which one has the focus.
What's even weirder, it happens even if the combo box is disabled. After that I can't deselect the text with the mouse or keyboard, because the control doesn't get any input.
I tried to remove the ES_NOHIDESEL style of the edit child control, but that didn't help. The text is selected and the selection is visible even though the edit box doesn't have the focus. Maybe this is not a style that can be modified after creation.
I tried on XP with and without a manifest. I tried manually resizing the control on WM_SIZE and also with WTL's CDialogResize. There was no difference.
Any ideas how to resize a combo box without selecting the text???
Thanks
Ivo
.
- Follow-Ups:
- Re: Resizing combo boxes
- From: John Carson
- Re: Resizing combo boxes
- Prev by Date: Re: ListCtrl - Handling Ctrl+
- Next by Date: Re: Resizing combo boxes
- Previous by thread: RE: Determining richedit required height
- Next by thread: Re: Resizing combo boxes
- Index(es):
Relevant Pages
|