Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by wibu on Oct 19, 2009 11:25
open dhtmlx forum
change the size when the Combo gets the focus

Hello !

I am using the dhtmlxCombo on my netbook.
The size of the normal Form-Fields grows dynamcly when it get's the focus.

Is this also possible with the dhtmlxCombo
Answer posted by Alex (support) on Oct 20, 2009 05:22

Hello, 

combo provides enableOptionAutoWidth method that sets the width of the option list automaticaly (it doesn't compatible with autocomplete mode).

combo.enableOptionAutoWidth(true); 

this method requires dhtmlxcombo_whp.js extention.

There is also setSize method that allows to set a new width for the whole combo.

 

Answer posted by wibu on Oct 21, 2009 03:03
Answer posted by wibu on Oct 21, 2009 03:04

I tried the setSize-method with the event "onopen".
But this fires only when the dropdown opens.
Is it possible, that an event fires, when the inputbox of the combo get's the focus ?
wibu@utanet.at
Answer posted by Alex (support) on Oct 21, 2009 06:56

Unfortunately, combo doesn't provide such event handler.

But DOMelem_input property is combo input object. You can try to use it:

combo.DOMelem_input.onfocus = function(e){

}

Answer posted by wibu on Oct 22, 2009 10:49

Hello Alex !

I did how you told me and it runs.
Thank you for your support !