Combobox - changing between editable and non-editable 
Author Message
 Combobox - changing between editable and non-editable

 If I create a combobox with the CBS_DROPDOWNLIST so that
it is not editable, can I change it on the fly to make it
editable? I tried using SendDlgItemMessage, but I can't
find a flag to make the combobox editable again. Is there
a way to do this? If so, how can it be done? Thank you...


Wed, 01 Jun 2005 00:09:01 GMT  
 Combobox - changing between editable and non-editable


Quote:
> If I create a combobox with the CBS_DROPDOWNLIST so that
> it is not editable, can I change it on the fly to make it
> editable? I tried using SendDlgItemMessage, but I can't
> find a flag to make the combobox editable again. Is there
> a way to do this? If so, how can it be done? Thank you...

Changing insignificant styles would normally be done with ModifyStyle()
(MFC) or SetWindowLong(hWnd, GWL_STYLE, ...) (API), but changing between
editable or non-editable on a combo box is considered not insignificant;
therefore, it cannot be done on the fly to my knowledge.

--
--
Jason Teagle

-----------------------------------------------------------
A list of programming resources I use:
ML: www.windev.org, www.codecipher.com, www.beginthread.com
MB: www.codeguru.com, www.codeproject.com
NG: comp.lang.java.*
OI: www.php.net
-----------------------------------------------------------



Wed, 01 Jun 2005 00:39:15 GMT  
 Combobox - changing between editable and non-editable
 Thank you for answering. It's not exactly what I would
have like to have heard though. The only thing I can do is
hide the original combobox and create another one right
over it that is editable or create a child window. Again,
thank you for your help...

Quote:
>-----Original Message-----



>> If I create a combobox with the CBS_DROPDOWNLIST so that
>> it is not editable, can I change it on the fly to make
it
>> editable? I tried using SendDlgItemMessage, but I can't
>> find a flag to make the combobox editable again. Is
there
>> a way to do this? If so, how can it be done? Thank
you...

>Changing insignificant styles would normally be done with
ModifyStyle()
>(MFC) or SetWindowLong(hWnd, GWL_STYLE, ...) (API), but
changing between
>editable or non-editable on a combo box is considered not
insignificant;
>therefore, it cannot be done on the fly to my knowledge.

>--
>--
>Jason Teagle

>----------------------------------------------------------
-
>A list of programming resources I use:
>ML: www.windev.org, www.codecipher.com,
www.beginthread.com
>MB: www.codeguru.com, www.codeproject.com
>NG: comp.lang.java.*
>OI: www.php.net
>----------------------------------------------------------
-

>.



Wed, 01 Jun 2005 21:41:51 GMT  
 Combobox - changing between editable and non-editable


Quote:
> Thank you for answering. It's not exactly what I would
> have like to have heard though. The only thing I can do is
> hide the original combobox and create another one right
> over it that is editable or create a child window. Again,
> thank you for your help...

If you create one editable and one not, you can simply show or hide the pair
as needed each time. So it's only one extra combo on the form {:v)  But yes,
it's a shame it can't be done.

--
--
Jason Teagle

-----------------------------------------------------------
A list of programming resources I use:
ML: www.windev.org, www.codecipher.com, www.beginthread.com
MB: www.codeguru.com, www.codeproject.com
NG: comp.lang.java.*
OI: www.php.net
-----------------------------------------------------------



Fri, 03 Jun 2005 18:05:08 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Non-Editable ComboBox ?

2. Problem with Creating an Editable ComboBox

3. How to set combobox editable?

4. editable Combobox

5. How to set combobox editable?

6. making cells in Datagrid Non-Editable...

7. Adding a constructor for a given (non editable) class

8. Move inside in a non-editable editbox?

9. Adding a constructor for a given (non editable) class

10. How to make CEditCtrl non-editable?

11. Making a combo box non-editable

12. ListView Items: Can they be Editable?

 

 
Powered by phpBB® Forum Software