implemented Get(Class)DefaultAttributes()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-04-01 00:14:42 +00:00
parent a4a5c96ed7
commit 39c7a53c9b
4 changed files with 44 additions and 6 deletions

View File

@@ -363,11 +363,6 @@ bool wxListCtrl::Create(wxWindow *parent,
0, LVS_EX_FULLROWSELECT);
}
// inherit foreground colour but our background should be the same as for
// listboxes and other such "container" windows and not inherited
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
SetForegroundColour(GetParent()->GetForegroundColour());
return TRUE;
}
@@ -546,6 +541,17 @@ void wxListCtrl::SetWindowStyleFlag(long flag)
// accessors
// ----------------------------------------------------------------------------
/* static */ wxVisualAttributes
wxListCtrl::GetClassDefaultAttributes(wxWindowVariant variant)
{
wxVisualAttributes attrs = GetCompositeControlsDefaultAttributes(variant);
// common controls have their own default font
attrs.font = wxGetCCDefaultFont();
return attrs;
}
// Sets the foreground, i.e. text, colour
bool wxListCtrl::SetForegroundColour(const wxColour& col)
{