Currently, I built a Login form by using Wxsmith in code blocks IDE, I would like to know is there a way that I can add the mouse hover effect to Wxbutton and change border-radius?
I went through https://docs.wxwidgets.org/trunk/classwx_any_button.html
there is something called "void wxAnyButton::SetBitmapCurrent(const wxBitmap & bitmap)" for mouse hover. But can't understand it really and I don't know where to use it. please help me new to Wxwidgets.
You can indeed change the bitmap shown by the button by calling SetBitmapCurrent()
function and passing it the bitmap you want to use in the "hover" state. If you do this, you may want to also use a bitmap for the button in the normal state using SetBitmapLabel()
.
There is no way to change border radius of the native button directly because it simply doesn't use any such thing.