+wxString MyHtmlListBox::OnGetItem(size_t n) const
+{
+ if ( !n && m_firstItemUpdated )
+ {
+ return wxString::Format(_T("<h1><b>Just updated</b></h1>"));
+ }
+
+#ifdef USE_HTML_FILE
+ wxString s;
+ if ( m_file.IsOpened() )
+ s = m_file[n];
+
+ return s;
+#else
+ int level = n % 6 + 1;
+ return wxString::Format(_T("<h%d><font color=#%2x%2x%2x>")
+ _T("Item</font> <b>%lu</b>")
+ _T("</h%d>"),
+ level,
+ abs((int)n - 192) % 256,
+ abs((int)n - 256) % 256,
+ abs((int)n - 128) % 256,
+ (unsigned long)n, level);
+#endif
+}
+
+wxColour MyHtmlListBox::GetSelectedTextColour(const wxColour& colFg) const
+{
+ return m_change ? wxHtmlListBox::GetSelectedTextColour(colFg) : colFg;
+}
+
+void MyHtmlListBox::UpdateFirstItem()
+{
+ m_firstItemUpdated = !m_firstItemUpdated;
+
+ RefreshLine(0);
+}
+