Hi My old friends,
As we know there’s a method setSize() to set the width of the combo input . and the method enableOptionAutoWidth(1) to make sure set automatic width for list of combo options to let’s see the complete option .
My question is :
How can autoresize the width of the combo input? So i we can make the combo input as long as the longest option ? If not , the option list will be longer than the input , i think that’s not friendly to us .
I have thought a way : first get the width of the longest option and then use the method setSize using the width to make sure the input as long as the options . But i don’t know how to access all the options elements and get the width of them ? If you can provide the detail code or some demo , it’s will very helpful for me .
Many thanks .