简体   繁体   English

通过从Flex中的另一个mxml文件访问组件使组件不可见

[英]Making a component invisible by accessing it from another mxml file in flex

In my application i am having 2 mxml files "Offerblock.mxml","messagblock.mxml" which contains panels. 在我的应用程序中,我有2个mxml文件“ Offerblock.mxml”,“ messagblock.mxml” ,其中包含面板。 I am using a custom component ( panelMenuComponent.mxml ) which contains icons for showing in panel title bar.This custom component is common for both mxml files. 我正在使用一个自定义组件( panelMenuComponent.mxml ),其中包含用于在面板标题栏中显示的图标。这个自定义组件对于两个mxml文件都是通用的。 Panels in Offerblock.mxml file need all 5 icons and panels in messagblock.mxml file need only 4 icons. Offerblock.mxml文件中的面板需要全部5个图标, messagblock.mxml文件中的面板仅需要4个图标。 For both the mxml files i am using same skin for panel creation.In that skin only i am adding that PanelMenuComponent custom component. 对于这两个mxml文件,我使用相同的皮肤进行面板创建。仅在该皮肤中我添加了PanelMenuComponent自定义组件。 So how to make 1 icon in custom component invisble while it was accessing from messageblock.mxml file. 因此,当从messageblock.mxml文件进行访问时,如何使自定义组件中的1个图标不可见。

As I do understand your question it would be - visible="false" as visible="true" is the default! 据我了解,您的问题将是-visible =“ false”,因为visible =“ true”是默认设置! If you want to get further into it use maybe modules and / or components! 如果您想进一步了解它,可以使用模块和/或组件! rgs aktell RGS阿克泰尔

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM