DHTMLXCOMBO Auto Width

I have set this property



z.enableOptionAutoWidth(true);



and aslo apply this to CSS file



.dhx_combo_list div{

white-space:nowrap;

}



and also this

.dhx_combo_list{

overflow-x:auto;



}



but still having problem combobox doesnot resize auto width




The issue can not be recreated locally.


Please provide the sample where it can be reproduced at support@dhtmlx.com


Plz Find attached sample and plz help me to solve this issue.



 



Thanks , In Advance


DHTMLXCOMBO AUTO WIDTHISSUE.rar (18.9 KB)


The dhtmlxcombo_whp.js extension is missed in your sample. So, enableOptionAutoWidth was not defined.


Please, try to include this file - and the issue should occur.


Thanks again,



but the auto width option is enable only for the list



 i want dhtmlxcombo control to  resize its width to the max length of a option in the list so that if a option with lengthy text is selected



should be shown on the control without missing any character

Unfortunately, combo API doesn’t allow to set input width automatically.


 



Oh thats disaster

While it not possible by API you can attach custom event handler to onChange event and call the combo.setSize(some) from it to change the width of combo after option selected.

Thanks For ur Support.