开发者

Best way to make elements non-selectable in Flex

All,

As part of requirements for a new feature of "locking" a page, it is desired to have all elements on a locked page be non-selectable. This is not to be confused with disabled. All elements should appea开发者_如何学Cr as if the page were active, but not be selectable.

The current thought is to create a clear canvas and place it over the existing elements. With this thought, I have two questions:

  1. if you can think of a better way to make all items non-selectable than applying a clear canvas element over the existing elements could you describe it?
  2. if not, what is the best way to retrofit existing implementations to accept the overlayed canvas item? BTW, all .mxml pages inherit from a custom .as file.

Sorry if this is not very descriptive, however, I am new to Flex and have spent many days trying to figure this out.

Thanks, Todd


You could also set the mouseChildren property of the page to false so the elements will not receive any mouseEvents


All,

To fully "lock" a screen from user manipulation, one must combine Chris Bos's and www.Flextras.com's answers: disable mouse input (mouseChildren) and disable keyboard focus (focusEnabled).

Todd


Would the focusEnabled property work for you?

Documentation says it only relates to "Tabbing", but my memory says it relates to all sorts of selection.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜