当鼠标越过按钮时,我可以更改按钮背景颜色吗?

Can I change the button background color when the mouse is over the button?

本文关键字:按钮 背景 颜色 鼠标 我可以      更新时间:2023-10-16

我用单个wxbutton创建了一个简单的框架,当鼠标通过按钮上时,我可以更改按钮背景颜色吗?

var name = Button1
class name = wxButton

如果有人可以向我解释如何逐步向我解释?

您是否尝试捕获WXEVT_LEAVE_WINDOW和WXEVT_ENTER_WINDOW从按钮(不是您的窗口(,然后更改所谓函数中的按钮背景颜色?