Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 flash builder 4 中,我如何使用蒙皮选项来确保弹出下拉列表更改其宽度以适合列表中最长的项目?(提示区域 - 关闭时的组件 - 不应更改其宽度)
谢谢萨尔
明白了 - (但我相信有更简单的方法)
制作一个自定义 DropDownListSkin 并使其成为 DropDownList 的皮肤。在 popupanchor 定义中将 popUpWidthMatchesAnchorWidth 设置为 false。
循环遍历列表以找到最长的项目并从中计算所需的宽度,并在下拉列表的打开事件中将皮肤的 dropDown 属性(它是一个组)的宽度设置为计算出的宽度。