Make background of book controls in wxMSW be the same as parent

This improves their appearance especially when they're used as children of
wxNotebook, which uses a different background colour than plain wxPanel by
default.

This generalizes what was already done for wxChoicebook in 6cab632f
(see #12503) to all book controls.

Closes #16878.
This commit is contained in:
Iwbnwif Yiw
2016-04-03 15:27:28 +02:00
committed by Vadim Zeitlin
parent 059704edc1
commit 015ffbb0ef
2 changed files with 5 additions and 5 deletions

View File

@@ -311,6 +311,11 @@ protected:
// Lay out controls
virtual void DoSize();
// It is better to make this control transparent so that by default the controls on
// its pages are on the same colour background as the rest of the window. If the user
// prefers a coloured background they can set the background colour on the page panel
virtual bool HasTransparentBackground() wxOVERRIDE { return true; }
// This method also invalidates the size of the controller and should be
// called instead of just InvalidateBestSize() whenever pages are added or
// removed as this also affects the controller

View File

@@ -79,11 +79,6 @@ public:
// returns the choice control
wxChoice* GetChoiceCtrl() const { return (wxChoice*)m_bookctrl; }
// Override this to return true because the part of parent window
// background between our controlling wxChoice and the page area should
// show through.
virtual bool HasTransparentBackground() wxOVERRIDE { return true; }
protected:
virtual void DoSetWindowVariant(wxWindowVariant variant) wxOVERRIDE;