// destructor cleans up whatever resources we use
virtual ~wxHtmlListBox();
- // refresh everything
+ // override some base class virtuals
virtual void RefreshAll();
-
+ virtual void SetItemCount(size_t count);
protected:
// this method must be implemented in the derived class and should return
// set the number of items to be shown in the control
//
// this is just a synonym for wxVScrolledWindow::SetLineCount()
- void SetItemCount(size_t count);
+ virtual void SetItemCount(size_t count);
// delete all items from the control
void Clear() { SetItemCount(0); }
wxVListBox::RefreshAll();
}
+void wxHtmlListBox::SetItemCount(size_t count)
+{
+ // the items are going to change, forget the old ones
+ m_cache->Clear();
+
+ wxVListBox::SetItemCount(count);
+}
+
// ----------------------------------------------------------------------------
// wxHtmlListBox implementation of wxVListBox pure virtuals
// ----------------------------------------------------------------------------