问题描述
在单击时是否可以使按钮增大?
is there anyway to make a button grown when clicked?
不透明的形式.
例如,背景色为蓝色,当颜色从浅色逐渐变为深白色时单击onclick.
example, backcolor is blue, onclick when color will change from light weight and slowly to dark white.
是的,我们必须创建一个自定义按钮.
i noe we have to make a custom button.
但是对于这一部分,我想不出任何可以实现此目标的东西.
but for this part i cant think of anything that could achieve this.
推荐答案
【 引用 从OP }
【Quote From OP】
backcolor为蓝色,当颜色从浅色逐渐变为深色时,请单击 白色.
backcolor is blue, onclick when color will change from light weight and slowly to dark white.
【 解决方案 )
您可以尝试创建一个Thread实例并设置其IsBackGround = True,然后 请使用此方法.调用"Thread.Sleep(1000)",在一段时间后调用将按钮的背景颜色更改为所需的颜色-假设1 s可以更改颜色,则可以还尝试将属性"Opaticy"设置为
You can try to create a Thread instance and set its IsBackGround=True, and then please use this.Invoke to change the background of the color of the button to what color you want after a period of time by calling "Thread.Sleep(1000)"——Suppose 1 s to change the color, and you can also try to set the property "Opaticy" slowly in the thread.
也许您也可以尝试考虑使用计时器".
这篇关于单击时制作一个增长按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!