我将如何从 flex 移动应用程序中的 actionBar“actionContent”中删除一个按钮?
我试过这些:
this.stage.removeChild(menu_btn);
this.removeChild(menu_btn);
stage.removeChild(menu_btn);
this.stage.removeElement(menu_btn);
this.removeElement(menu_btn);
stage.removeElement(menu_btn);
我对这些没有任何运气。我猜它在动作内容中的位置不被视为舞台。有任何想法吗?
<s:actionContent>
<s:CalloutButton id="menu_btn" icon="@Embed('assets/images/menu/menu_btn.png')" visible="false">
<s:VGroup>
<s:Button id="btn_one" label="Button" />
</s:VGroup>
</s:CalloutButton>
</s:actionContent>
actionContent 是这样设置的,我知道对于大多数 mxml 东西我可以给它一个 ID 来引用它,但我不知道如何给动作内容一个 ID 号<s:actionContent id="testID">
不起作用。那么我怎样才能访问它来删除它呢?让它不可见并没有削减它我需要实际删除它。