void wxAdvancedListCtrl::ColourListItem(wxListItem &info) { static bool SwapColour = false; wxColour col; wxListItemAttr *ListItemAttr = info.GetAttributes(); // Don't change a background colour we didn't set. if (ListItemAttr && ListItemAttr->HasBackgroundColour()) { return; } // light grey coolness if (SwapColour) col = ItemShade; else col = BgColor; SwapColour = !SwapColour; info.SetBackgroundColour(col); }