在 Flex3 中创建未选择子项的自定义 Accordion 组件
任何在没有选择子项的情况下处理自定义手风琴组件的人。以下是我的要求
默认情况下,在 Accordion 的初始加载中,只需要显示标题。每次单击标题时,只有单击的标题和相应的容器应该可见。如果我们再次单击标题,手风琴将移至初始状态。
这些功能的工作方式应该类似于手风琴与所有 TWEEN 效果的工作方式。
提前致谢。
Any worked on custom Accordion component with no child selected. The following is my requirement
By default on initial load of Accordion, only headers have to be shown. On each header click, only the clicked header and the respective container should be visible. If we clicked again on header, the Accordion will be moved to initial state.
These features should work similary how the Accordion will work with all TWEEN effects.
Thanks in Advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我用 TabNavigator 实现了类似的概念。
我的实现使用以下步骤: 使用
height = 0 初始化容器
将鼠标单击侦听器添加到容器(onCapture=true,因为 tabNavigator 终止单击事件,不确定 Accordion 容器是否需要此)
在单击处理程序中,根据状态添加/删除选项卡,并将高度更改为适当的值(如果从打开的选项卡到关闭的容器,则返回到零;如果从关闭到打开,则从 0 到 100%)。
是的,这是非常高的水平,但这个问题是几个月前提出的。如果您正在观看,但仍需要更多详细信息,请发表评论,我可以提供帮助。
I implemented a similar concept with a TabNavigator.
My implementation used the following steps:
Initialize the container with height = 0
Add a mouse-click listener to the container (onCapture=true, because tabNavigator kills the click event, not sure if you need this for Accordion container)
In the click handler, add/remove tabs depending on the state and change height to appropriate values (back to zero if coming from open tab to closed container, from 0 to 100% if going from closed to open).
Yes, this is very high level, but the question was asked months ago. If you are watching it, and you are still in need of more detail, please comment and I can help.