diff --git a/docs/changes.txt b/docs/changes.txt index 14a5e37a96..b83555f101 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -102,6 +102,10 @@ wxGTK: - Don't crash if command line is not valid UTF-8 (Unicode build only) +wxUniv: + +- It is now possible to set background colour of wxStaticText + 2.8.0 ----- diff --git a/src/univ/stattext.cpp b/src/univ/stattext.cpp index 509a5d6dde..83ebf31eaf 100644 --- a/src/univ/stattext.cpp +++ b/src/univ/stattext.cpp @@ -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(); }