bitmaps will inadvertently be mapped to system colours.
To do this, set the msw.remap system option before creating the toolbar:
@code
- wxSystemOptions::SetOption(wxT("msw.remap"), 0);
+ wxSystemOptions::SetOption("msw.remap", 0);
@endcode
If you wish to use 32-bit images (which include an alpha channel for
transparency) use:
@code
- wxSystemOptions::SetOption(wxT("msw.remap"), 2);
+ wxSystemOptions::SetOption("msw.remap", 2);
@endcode
Then colour remapping is switched off, and a transparent background
used. But only use this option under Windows XP with true colour:
ignores @c wxTB_NOICONS style. Also, toggling the @c wxTB_TEXT works only
if the style was initially on.
- @beginEventTable{wxCommandEvent}
+ @beginEventEmissionTable{wxCommandEvent}
@event{EVT_TOOL(id, func)}
Process a @c wxEVT_COMMAND_TOOL_CLICKED event (a synonym for @c
wxEVT_COMMAND_MENU_SELECTED). Pass the id of the tool.
wxSize GetMargins() const;
/**
- Returns the size of bitmap that the toolbar expects to have. The default
- bitmap size is 16 by 15 pixels.
+ Returns the size of bitmap that the toolbar expects to have.
+
+ The default bitmap size is platform-dependent: for example, it is 16*15
+ for MSW and 24*24 for GTK. This size does @em not necessarily indicate
+ the best size to use for the toolbars on the given platform, for this
+ you should use @c wxArtProvider::GetNativeSizeHint(wxART_TOOLBAR) but
+ in any case, as the bitmap size is deduced automatically from the size
+ of the bitmaps associated with the tools added to the toolbar, it is
+ usually unnecessary to call SetToolBitmapSize() explicitly.
@remarks Note that this is the size of the bitmap you pass to AddTool(),
and not the eventual size of the tool button.