I do not understand the difference between SetBitmapLabel and SetBitmap. The documentation in wx/anybutton.h says one is a synonym of the other. The Doxygen documentation is different for both methods (interestingly, GetBitmap and GetBitmapLabel are mentioned in the Doxygen documentation as identical methods).
Looking at the code for macOS the main and significant(!) difference is SetBitmap calls SetBitmapLabel and sets the bitmap position by calling SetBitmapPosition.
The difference is significant when using a wxBitmapButton. Passing a bitmap bundle to wxBitmapButton's constructor centers(!) the bitmap in the button. Calling SetBitmapLabel to modify the bitmap still keeps the bitmap centered. When calling SetBitmap the bitmap is aligned to one of the sides.
In my case I definitely do not like the bitmap to be aligned to one of the button's edges. Therefore, the difference in the implementation is appreciated as there does not seem to be an equally easy method to center the bitmap. My question is: is this intended behaviour or is this a nice feature? Anyway, I think that documentation should be updated.
[macOS] Difference between wxAnyButton::SetBitmapLabel and wxAnyButton::SetBitmap?!
Re: [macOS] Difference between wxAnyButton::SetBitmapLabel and wxAnyButton::SetBitmap?!
Hi,
Please open an issue at github.com/wxwidgets/wxwidgets.git.
This is the user forum and no core devs are coming here.
Thank you.
Please open an issue at github.com/wxwidgets/wxwidgets.git.
This is the user forum and no core devs are coming here.
Thank you.