开发者

how to auto resize the width of a flex spark dropdown component?

开发者 https://www.devze.com 2023-01-27 14:44 出处:网络
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?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消