求教:菜单选项和按钮关联
请问:要实现菜单选项和按钮关联如何实现的.就是:我点了按钮的效果和点菜单选项得到同一个case事件.
如下图:中有default菜单选项,可以进入,但我不知道如何再用一个default按钮和它关联起来.望高手指点.
<img src="attachments/dvbbs/2006-2/200622410432397904.bmp" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'attachments/dvbbs/2006-2/200622410432397904.bmp\');}" onmousewheel="return imgzoom(this);" alt="" /> 在CASE前面作处理就可以了,用一个条件或就可以!判断是不是菜单项,或者是不是按了按钮,二个之中一个条件符合就可以送过去进行default处理! <P>先谢谢了!</P>
<P>问题怎么判断是不是"判断是不是菜单项,或者是不是按了按钮"..</P>
<P>他们好象不是同一个类型的吧!.再就是,我menu 中还有其他的case,我如何处理case条件呢?</P>
<P>能小给个例子不?</P> <P>还有其它的菜单项就不能这样子了!看来还得把你的菜单需要处理的事情做成子VI,然后当按钮触发的时候也调用它了!这种方法比较简单,我想想有没有更好的!</P> <P>呵呵,谢谢了..</P>
<P>可以这样:</P>http://forums.ni.com/attachments/ni/170/169800/1/two_selects.jpg
页:
[1]