+
+ if ( show )
+ {
+ // set the colours/fonts if we have any
+ if ( attr )
+ {
+ if ( attr->HasTextColour() )
+ {
+ m_colFgOld = m_control->GetForegroundColour();
+ m_control->SetForegroundColour(attr->GetTextColour());
+ }
+
+ if ( attr->HasBackgroundColour() )
+ {
+ m_colBgOld = m_control->GetBackgroundColour();
+ m_control->SetBackgroundColour(attr->GetBackgroundColour());
+ }
+
+ if ( attr->HasFont() )
+ {
+ m_fontOld = m_control->GetFont();
+ m_control->SetFont(attr->GetFont());
+ }
+
+ // can't do anything more in the base class version, the other
+ // attributes may only be used by the derived classes
+ }
+ }
+ else
+ {
+ // restore the standard colours fonts
+ if ( m_colFgOld.Ok() )
+ {
+ m_control->SetForegroundColour(m_colFgOld);
+ m_colFgOld = wxNullColour;
+ }
+
+ if ( m_colBgOld.Ok() )
+ {
+ m_control->SetBackgroundColour(m_colBgOld);
+ m_colBgOld = wxNullColour;
+ }
+
+ if ( m_fontOld.Ok() )
+ {
+ m_control->SetFont(m_fontOld);
+ m_fontOld = wxNullFont;
+ }
+ }