NI LabVIEW,CVI,数据采集等产品讨论区

取消
显示结果 
搜索替代 
您的意思是: 

如何使自定义按钮灰掉呢?

已解决!
转到解答

hi!大家好!

 

在使用自定义按钮的时候遇到这样一个问题:在自定义按钮中导入一个喇叭的图片作为控制音量的按钮(背景透明),我想在按下这个按钮的时候能使之灰掉,弹起来之后重新恢复颜色,请问如何实现呢?谢谢!

0 项奖励
1 条消息(共 5 条)
5,407 次查看

Why do you need to gray it out? What is the purpose?

And, when and how it is reset? Manually? Or...

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
2 条消息(共 5 条)
5,377 次查看

try it

 

123.jpg

3 条消息(共 5 条)
5,365 次查看
解答
已被主题作者 Tom.Ba 接受

Hi, such effect may be achieved through Customized Control

 

LVVILIB_GUI_customised-volu.gif 

 

In above example, two "speaker" images are prepared; darker and lighter.

 

By Customizing a boolean control, respective image is imported for each of the four image items.

 

The result... the "lighter" image is shown when the button is pressed, and "darker" image when button is released. 

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
4 条消息(共 5 条)
5,362 次查看
Thanks!
0 项奖励
5 条消息(共 5 条)
5,326 次查看