how to auto resize the width of a flex spark dropdown component?
-
29-09-2019 - |
Pergunta
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 component when it is closed - should not change it's width)
thanx Saar
Solução
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.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow