diff --git a/samples/htlbox/htlbox.cpp b/samples/htlbox/htlbox.cpp index 0522932c5e..a5a87d3431 100644 --- a/samples/htlbox/htlbox.cpp +++ b/samples/htlbox/htlbox.cpp @@ -475,13 +475,16 @@ wxString MyHtmlListBox::OnGetItem(size_t n) const return s; #else int level = n % 6 + 1; - wxString label = wxString::Format(_T("") + + wxColour clr(abs((int)n - 192) % 256, + abs((int)n - 256) % 256, + abs((int)n - 128) % 256); + + wxString label = wxString::Format(_T("") _T("Item %lu") _T(""), level, - abs((int)n - 192) % 256, - abs((int)n - 256) % 256, - abs((int)n - 128) % 256, + clr.GetAsString(wxC2S_HTML_SYNTAX).c_str(), (unsigned long)n, level); if ( n == 1 ) {