From: Vadim Zeitlin Date: Thu, 30 Aug 2012 20:20:44 +0000 (+0000) Subject: Document that menu item bitmaps must be set before appending them. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3ebf38b3b4ce09134d0b360d92ef5321ac235e50 Document that menu item bitmaps must be set before appending them. At least in MSW we need to know in advance whether we're going to use normal items or owner-drawn ones currently. Closes #3641. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/interface/wx/menuitem.h b/interface/wx/menuitem.h index 5df24fdc81..6b103a3c1a 100644 --- a/interface/wx/menuitem.h +++ b/interface/wx/menuitem.h @@ -316,6 +316,11 @@ public: @a checked is @true (default value) or SetBitmaps(wxNullBitmap, bmp) otherwise. + SetBitmap() must be called before the item is appended to the menu, + i.e. appending the item without a bitmap and setting one later is not + guaranteed to work. But the bitmap can be changed or reset later if it + had been set up initially. + Notice that GTK+ uses a global setting called @c gtk-menu-images to determine if the images should be shown in the menus at all. If it is off (which is the case in e.g. Gnome 2.28 by default), no images will