Flex 4 聚焦多个 UIComponent
我目前正在使用 Flex 4 编写一个 Floorplan 编辑器。
我有一个扩展了 Spark Group 类的 Floorplan 网格。此 Floorplan Grid 将包含扩展 UIComponent 类的对象。我希望用户能够在平面图上选择多个对象,并能够移动和调整大小。
我只是想知道是否可以使用 FocusManager “聚焦”多个对象,有点像在 Photoshop/Illustrator 中选择多个对象。
I'm currently coding a Floorplan editor with Flex 4.
I have a Floorplan Grid that extends the spark Group class. This Floorplan Grid will contain objects that extend the UIComponent class. I want the user to be able to select multiple objects on the Floorplan and be able for moving and resizing.
I'm just wondering if it's possible to have multiple objects being "focused" using the FocusManager, kind of like selecting multiple objects in Photoshop/Illustrator.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您似乎对“焦点”是什么有误解。一次只能有一个对象获得焦点。您的鼠标光标只能单击一个对象,并且您只能将键盘输入发送到单个文本框。
例如,我无法在 stackoverflow 上的浏览器文本框中以及同时打开的 Microsoft Word 文档中键入内容。
在我看来,您想要类似 allowMultipleSelection 设置为 true,可能使用 TileLayout。或者,如果您觉得需要编写自己的组件,则必须实现自己的“allowMultipleSelection”演绎。
You seem to have misunderstanding of what "Focus" is. Only one object can have focus at a time. Your mouse cursor can only click on one object and you can only send keyboard input to a single text box.
I can't, for example, type inside this browser textbox on stackoverflow and in the Microsoft Word document I have open at the same time.
It sounds to me like you want something like a List with allowMultipleSelection set to true, possibly using a TileLayout. Or, if you feel that you need to write your own component, you'll have to implement your own rendition of 'allowMultipleSelection'.