Hello,
I'm trying to use wxBitmapButton to style my application. I would like to have a square button that shows a certain icon ("Close.png"). Even tought the button and the icon have the same size (40x40) when I draw the icon above the button the button still have some gray margins (I would like the icon to entirely cover the button). How can I achieve this? Thank you!
wxButton request
wxButton request
- Attachments
-
- wxBitmapButton.png (1.3 KiB) Viewed 1102 times
-
- Close.png (1.03 KiB) Viewed 1102 times
Re: wxButton request
Please attache the constructor you are using, maybe something like this :
Code: Select all
Foo = new wxBitmapButton(this, ID, wxBitmap(wxImage(_T("Close.png"))), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW, wxDefaultValidator);
Last edited by saifcoder on Wed May 16, 2018 3:41 pm, edited 1 time in total.
Debian 9 - GCC 6 - wxWidgets 3.x U
Win 10 - GCC 8 - wxWidgets 3.x U
Mac OS X 10.x - Clang - wxWidgets 3.x U
i am in love with WX. Yes.
Win 10 - GCC 8 - wxWidgets 3.x U
Mac OS X 10.x - Clang - wxWidgets 3.x U
i am in love with WX. Yes.
Re: wxButton request
Hi,
Try to construct wxButton with the wxBU_EXACTFIT style.
Thank you.
Try to construct wxButton with the wxBU_EXACTFIT style.
Thank you.
Re: wxButton request
I haven't tried it, but my guess is that you'll need a custom control for this. I don't think you can suppress the rendering of the button outline.
Use the source, Luke!