]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/stattext.cpp
Fixed premature exit of helpview sample and utility
[wxWidgets.git] / src / univ / stattext.cpp
index 38da4fb592b02d1b877b4970fae732f68d5bb042..83ebf31eaf51cec685a486fd40f6a7f838eb51f7 100644 (file)
@@ -57,7 +57,7 @@ bool wxStaticText::Create(wxWindow *parent,
         return false;
 
     SetLabel(label);
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
@@ -88,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();
 }