Add wxPanel::SetBackgroundBitmap().
This method provides a simple way to set a background bitmap without defining an EVT_ERASE_BACKGROUND handler and, more importantly, one that works correctly in wxMSW for a window with children as it paints the background of transparent children too. Add a test of this method to the erase sample. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -124,6 +124,21 @@ public:
|
||||
*/
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
/**
|
||||
Set the background bitmap for this panel.
|
||||
|
||||
If @a bmp is a valid bitmap, this bitmap will be tiled over the panel
|
||||
background and show through any of its transparent children. Passing an
|
||||
invalid bitmap reverts to the default background appearance.
|
||||
|
||||
Notice that you must not prevent the base class EVT_ERASE_BACKGROUND
|
||||
handler from running (i.e. not to handle this event yourself) for this
|
||||
to work.
|
||||
|
||||
@since 2.9.2
|
||||
*/
|
||||
void SetBackgroundBitmap(const wxBitmap& bmp);
|
||||
|
||||
/**
|
||||
Overrides wxWindow::SetFocus().
|
||||
|
||||
|
Reference in New Issue
Block a user