From 9c5fd8a319e58c0d8c58d73360ee9d4874c87bd8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 15 Dec 2006 01:32:26 +0000 Subject: [PATCH] respect background colour of wxStaticText in wxUniv git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 4 ++++ src/univ/stattext.cpp | 8 ++++++++ 2 files changed, 12 insertions(+) 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(); } -- 2.45.2