[英]Can I change the button background color when the mouse is over the button?
I created a simple frame with a single wxbutton
, will I be able to change the button background color when the mouse is over the button?我用一个wxbutton
创建了一个简单的框架,当鼠标悬停在按钮上时,我能改变按钮的背景颜色吗?
var name = Button1
class name = wxButton
If it's so can anyone explain to me how to do it step by step?如果是这样,谁能向我解释如何一步一步地做到这一点?
您是否尝试从按钮(不是您的窗口)捕获 wxEVT_LEAVE_WINDOW 和 wxEVT_ENTER_WINDOW 并更改被调用函数中的按钮背景颜色?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.