I have a problem with the enableOptionAutoWidth function of dhtmlXCombo : the width adapts to the longest word of the option, not to the whole text of the option.
For exemple :
with this option :
d123 appareils automatiques
the width of the combobox adapts to “automatiques”, not to “d123 appareils automatiques”.
Here is the javascript (/dhtmlxcombo_whp.is incuded) :
var z=new dhtmlXCombo(“combo_zone1”,“alfa1”,“100”);
z.loadXML(“liste_codes_taxe.xml”);
z.enableOptionAutoWidth(true); // enables auto width of combo options
Here is the xml file encoded in utf-8 :
<?xml version="1.0" encoding="UTF-8" ?>
d123 appareils automatiques
d234 droits de circulation vins mousseux
d345 droits de circulation vins tranquilles
Combo allows to use wrap text inside options, and prefers it other sizing combo-list area.
You can change behavior by adding next css style to the page.
.dhx_combo_list div{
white-space:nowrap;
}
Thank you very much, it worked.
I had to change the overflow-x to let it overflow the combobox :
.dhx_combo_list{
overflow-x:auto;
}