- m_container.SetContainerWindow(this);
-}
-
-bool wxPanel::Create(wxWindow *parent, wxWindowID id,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxString& name)
-{
- return wxWindow::Create(parent, id, pos, size, style, name);
-}
-
-wxPanel::~wxPanel()
-{
-}
-
-// ----------------------------------------------------------------------------
-// event handlers
-// ----------------------------------------------------------------------------
-
-// Responds to colour changes, and passes event on to children.
-void wxPanel::OnSysColourChanged(wxSysColourChangedEvent& event)
-{
- SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE));
- Refresh();
-
- // Propagate the event to the non-top-level children
- wxWindow::OnSysColourChanged(event);
+ m_bitmapBg = bmp;
+
+ if ( m_bitmapBg.IsOk() )
+ {
+ Connect(wxEVT_ERASE_BACKGROUND,
+ wxEraseEventHandler(wxPanel::OnEraseBackground));
+ }
+ else
+ {
+ Disconnect(wxEVT_ERASE_BACKGROUND,
+ wxEraseEventHandler(wxPanel::OnEraseBackground));
+ }