杜琪峰复仇粤语百度云:ContextMenu在Flex的 spark Panel、TiltleWindow中不显...

来源:百度文库 编辑:中财网 时间:2024/05/09 04:32:37

ContextMenu在Flex的 spark Panel、TiltleWindow中不显示

分类: Flex 2011-04-27 10:06 77人阅读 评论(0) 收藏 举报 经过自己研究测试,发现按如下方式也可以实现pannel中菜单显示问题:   1 在pannel控件中设置属性mouseEnabled="true",如下:           2  在creationComplete call方法中再设置一次mouseEnabled = true         procArea.skin.mouseEnabled = true;     注意:目前还没仔细分析为什么要设置两次。但上述有步一步都不能少,否则设置无效。

 

 

 

下面是在网上看到的其它解决方式:

 

 

原文:http://www.cnblogs.com/SuperPig/archive/2010/08/31/1813792.html

 

Flex4的一个Bug

详见:

https://bugs.adobe.com/jira/browse/SDK-26182

https://bugs.adobe.com/jira/browse/SDK-25598

solution:

1) set mouseEnabled=true - in Panel 、TiltleWindow




 

2) set custom skin for Panel - copy-paste from spark.skins.spark.PanelSkin 、TiltleWindow
3) set mouseEnabled="true" for created custom skin

override protected function initializationComplete():void
  {
   this.mouseEnabled=true;
   useChromeColor = true;
   super.initializationComplete();
  }