git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21421
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// destructor cleans up whatever resources we use
virtual ~wxHtmlListBox();
// destructor cleans up whatever resources we use
virtual ~wxHtmlListBox();
+ // override some base class virtuals
virtual void RefreshAll();
virtual void RefreshAll();
+ virtual void SetItemCount(size_t count);
protected:
// this method must be implemented in the derived class and should return
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()
// 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); }
// delete all items from the control
void Clear() { SetItemCount(0); }
wxVListBox::RefreshAll();
}
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
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// wxHtmlListBox implementation of wxVListBox pure virtuals
// ----------------------------------------------------------------------------