Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by And on Nov 16, 2007 03:01
open dhtmlx forum
DHTMLXCombo width

Hi,
Is there a way to auto size combo width (not using setSize method to se fixed width)?
Answer posted on Nov 16, 2007 04:27
I'm not sure what do you mean by auto - size
If initial width was set in percents, combo will automatically react on window resizing , to maintain percent based size
If you mean size of drop down list, it can be switched to "adjust to content" mode by
    combo.autoOptionSize=true;
Answer posted by walter on Dec 13, 2007 14:38
I take it, that he's asking about an "auto size" width method.

I'm trying to do the same thing.

I have 2 COMBO boxes, one affects the other.

The second box does not expand (to the left) to display the entire OPTION as a single line.

I thought that this would work...

   combo.autoOptionSize=true;


Nope. The second box does not open up at all. It maintains its original width.

Thx
Answer posted by Support on Dec 14, 2007 04:08
Please check attached sample
The combo adjust list width if text can't be split in few lines ( you can force it by adding white-space:nowrap; in combo css )
Attachments (1)
Answer posted by Stan on Mar 20, 2008 07:50

Where should I place the  "white-space:nowrap"  style in dhtmlxcombo.css?

Thank you,

Stan.

 

Answer posted by Support on Mar 21, 2008 03:56
.dhx_combo_list div{
    cursor:default;
    padding:2px 2px 2px 2px;
    white-space:nowrap;
}