if (parent)
parent->AddChild(this);
- wxSystemSettings settings;
- SetBackgroundColour(settings.GetSystemColour(wxSYS_COLOUR_WINDOW));
+ SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
SetForegroundColour(parent->GetForegroundColour());
m_windowId = ( id == -1 ) ? (int)NewControlId() : id;
void wxListBox::SetupColours()
{
- SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
+ SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
SetForegroundColour(GetParent()->GetForegroundColour());
}
#if wxUSE_OWNER_DRAWN
if ( m_windowStyle & wxLB_OWNERDRAW )
+ {
// update item's text
m_aItems[N]->SetName(s);
+ // reassign the item's data
+ ListBox_SetItemData(GetHwnd(), N, m_aItems[N]);
+ }
#endif //USE_OWNER_DRAWN
}
wxDC dc;
dc.SetHDC((WXHDC)hdc);
- dc.SetFont(wxSystemSettings::GetSystemFont(wxSYS_ANSI_VAR_FONT));
+ dc.SetFont(wxSystemSettings::GetFont(wxSYS_ANSI_VAR_FONT));
pStruct->itemHeight = dc.GetCharHeight() + 2*OWNER_DRAWN_LISTBOX_EXTRA_SPACE;
pStruct->itemWidth = dc.GetCharWidth();