Need to set background colour for wxListBox, not just wxCheckListBox,
to avoid scrolling problem when Windows effects are switched on. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -322,14 +322,8 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
long style,
|
long style,
|
||||||
const wxValidator& validator, const wxString& name)
|
const wxValidator& validator, const wxString& name)
|
||||||
{
|
{
|
||||||
if (wxListBox::Create(parent, id, pos, size, n, choices,
|
return wxListBox::Create(parent, id, pos, size, n, choices,
|
||||||
style | wxLB_OWNERDRAW, validator, name))
|
style | wxLB_OWNERDRAW, validator, name);
|
||||||
{
|
|
||||||
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
|
bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
|
||||||
@@ -338,14 +332,8 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
long style,
|
long style,
|
||||||
const wxValidator& validator, const wxString& name)
|
const wxValidator& validator, const wxString& name)
|
||||||
{
|
{
|
||||||
if (wxListBox::Create(parent, id, pos, size, choices,
|
return wxListBox::Create(parent, id, pos, size, choices,
|
||||||
style | wxLB_OWNERDRAW, validator, name))
|
style | wxLB_OWNERDRAW, validator, name);
|
||||||
{
|
|
||||||
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// misc overloaded methods
|
// misc overloaded methods
|
||||||
|
@@ -174,6 +174,10 @@ bool wxListBox::Create(wxWindow *parent,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Necessary to prevent scroll problems within a notebook with Windows
|
||||||
|
// effects enabled
|
||||||
|
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
||||||
|
|
||||||
// initialize the contents
|
// initialize the contents
|
||||||
for ( int i = 0; i < n; i++ )
|
for ( int i = 0; i < n; i++ )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user