X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e1d3601acaecd1c69c453b60610ba98f619bd383..0f5378d414cb68caaa535199c1af12dec1720c3d:/src/common/panelcmn.cpp?ds=sidebyside diff --git a/src/common/panelcmn.cpp b/src/common/panelcmn.cpp index fc6788c3ae..cdc191a7af 100644 --- a/src/common/panelcmn.cpp +++ b/src/common/panelcmn.cpp @@ -85,3 +85,37 @@ wxCONSTRUCTOR_6( wxPanel, wxWindow*, Parent, wxWindowID, Id, \ wxString, Name) +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxPanelBase creation +// ---------------------------------------------------------------------------- + +bool wxPanelBase::Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + if ( !wxWindow::Create(parent, id, pos, size, style, name) ) + return false; + + // so that non-solid background renders correctly under GTK+: + SetThemeEnabled(true); + +#if defined(__WXWINCE__) && (defined(__POCKETPC__) || defined(__SMARTPHONE__)) + // Required to get solid control backgrounds under WinCE + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); +#endif + + return true; +} + +void wxPanelBase::InitDialog() +{ + wxInitDialogEvent event(GetId()); + event.SetEventObject(this); + GetEventHandler()->ProcessEvent(event); +}