how to auto resize the width of a flex spark dropdown component?
in flash builder 4 how do i use the skinning option to make sure the popup dropdown list changes it's width to fit the longest item in the list? (the prompt area - the comp开发者_运维技巧onent when it is closed - should not change it's width)
thanx Saar
got it - (but i am sure there is an easier way)
make a custom DropDownListSkin and make it the skin of the DropDownList. in the popupanchor definition set popUpWidthMatchesAnchorWidth to false.
cycle through the list to find the longest item and calculate desired width from it and on the open event of the dropdownlist set the width of the skin's dropDown property(which is a group) to the calculated width.
精彩评论