The expand to fit would only work on a dynamic form and is only used when feeding data into the form. You can resize the dropdown box to fit your widest item, but I assume that you do not have the room to do that .....right?
The form is saved as dynamic and you are correct about not having enough room.
So you want to have the dropdown change size as I activate it, but after I make a selection you want it to shrink back to a size that fits in the form ....right?
this.w = "XXin";
this.w = "YYin";
Where XX is the expanded length for the dropdown field, and YY is the default or contracted length. This will expand the drop down field if the user's mouse is over that dropdown, and will have it go back to regular size if the user's mouse is not over the field.
That is the technique that I would use but I would use the Enter and Exit events instead if the mouseEnter and mouseExit events. You will have difficulty clicking on the arrow to cause the dropdown to expnd if you use those events.
Hope that helps
This is close to what I need. The only problem with this is
the width changes as soon as I am entering the field and the arrowhead and the underline runs into the field close to it.