flex问题menubar中加button,button的click触发事件没反应
我的代码如下:<mx:MenuBar><mx:Buttonid="Wt"label="WorkTime"height="30"width="110"click="vw.s...
我的代码如下:
<mx:MenuBar >
<mx:Button id="Wt" label="WorkTime" height="30" width="110" click="vw.selectedIndex=0"/>
<mx:Button id="Pm" label="ProjectManager" height="30" width="110" click="vw.selectedIndex=1"/>
<mx:Button id="Sf" label="Staff" height="30" width="110" click="vw.selectedIndex=2"/>
<mx:Button id="Rf" label="ReportForms" height="30" width="110" click="vw.selectedIndex=3" />
<mx:Button id="Lr" label="LeaveRequest" height="30" width="110" click="vw.selectedIndex=4" />
<mx:Button id="Hp" label="Help" height="30" width="110" click="vw.selectedIndex=5"/>
</mx:MenuBar>
</mx:HBox>
<mx:ViewStack id="vw" paddingLeft="170" paddingTop="35">
.......//几个场景的切换,保证没错误
</mx:ViewStack>
请教各位大侠!
另:话说是不是menubar中不能添加button呀??? 展开
<mx:MenuBar >
<mx:Button id="Wt" label="WorkTime" height="30" width="110" click="vw.selectedIndex=0"/>
<mx:Button id="Pm" label="ProjectManager" height="30" width="110" click="vw.selectedIndex=1"/>
<mx:Button id="Sf" label="Staff" height="30" width="110" click="vw.selectedIndex=2"/>
<mx:Button id="Rf" label="ReportForms" height="30" width="110" click="vw.selectedIndex=3" />
<mx:Button id="Lr" label="LeaveRequest" height="30" width="110" click="vw.selectedIndex=4" />
<mx:Button id="Hp" label="Help" height="30" width="110" click="vw.selectedIndex=5"/>
</mx:MenuBar>
</mx:HBox>
<mx:ViewStack id="vw" paddingLeft="170" paddingTop="35">
.......//几个场景的切换,保证没错误
</mx:ViewStack>
请教各位大侠!
另:话说是不是menubar中不能添加button呀??? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询