allow using wxBG_STYLE_CUSTOM even with the native controls and use it in wxTreeCtrl (see #9832)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-01-25 11:40:41 +00:00
parent 0a0e498415
commit 838ab05ede
2 changed files with 12 additions and 8 deletions

View File

@@ -734,6 +734,10 @@ bool wxTreeCtrl::Create(wxWindow *parent,
if ( !MSWCreateControl(WC_TREEVIEW, wstyle, pos, size) )
return false;
// this significantly reduces flicker when refreshing the control, for some
// reason the native control itself doesn't avoid background repainting
SetBackgroundStyle(wxBG_STYLE_CUSTOM);
#if wxUSE_COMCTL32_SAFELY
wxWindow::SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
wxWindow::SetForegroundColour(wxWindow::GetParent()->GetForegroundColour());