How do I add a label to wxWidgets wxBitmapButton?

前端 未结 1 1471
-上瘾入骨i
-上瘾入骨i 2021-01-20 21:06

How do I create a button using wxWidgets that has both a label(text) and an image or icon. If I select wxBitmapButton there is a field called \"label\". But whenever I write

相关标签:
1条回答
  • 2021-01-20 22:05

    You can only do this in wxWidgets 2.9.1 or greater and can use either a wxBitmapButton or wxButton. To quote from the documentation:

    Since version 2.9.1 wxButton supports showing both text and an image (currently only when using wxMSW, wxGTK or wxOSX/Cocoa ports), see SetBitmap() and SetBitmapLabel(), SetBitmapDisabled() methods. In the previous wxWidgets versions this functionality was only available in (the now trivial) wxBitmapButton class which was only capable of showing an image without text.

    0 讨论(0)
提交回复
热议问题