X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6aa89a22b8e47000c98bff05c6f545f331f1c353..20c81bed846981e90769826b94a91eebb91158f1:/src/univ/stattext.cpp diff --git a/src/univ/stattext.cpp b/src/univ/stattext.cpp index 8521014b48..83ebf31eaf 100644 --- a/src/univ/stattext.cpp +++ b/src/univ/stattext.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: univ/stattext.cpp +// Name: src/univ/stattext.cpp // Purpose: wxStaticText // Author: Vadim Zeitlin // Modified by: @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma implementation "univstattext.h" -#endif - #include "wx/wxprec.h" #ifdef __BORLANDC__ @@ -29,9 +25,10 @@ #if wxUSE_STATTEXT +#include "wx/stattext.h" + #ifndef WX_PRECOMP #include "wx/dcclient.h" - #include "wx/stattext.h" #include "wx/validate.h" #endif @@ -57,12 +54,12 @@ bool wxStaticText::Create(wxWindow *parent, const wxString &name) { if ( !wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name) ) - return FALSE; - + return false; + SetLabel(label); - SetBestSize(size); + SetInitialSize(size); - return TRUE; + return true; } // ---------------------------------------------------------------------------- @@ -91,6 +88,14 @@ wxSize wxStaticText::DoGetBestClientSize() const void wxStaticText::DoDraw(wxControlRenderer *renderer) { + if ( UseBgCol() ) + { + wxDC& dc = renderer->GetDC(); + dc.SetBrush(GetBackgroundColour()); + dc.SetPen(*wxTRANSPARENT_PEN); + dc.DrawRectangle(renderer->GetRect()); + } + renderer->DrawLabel(); }