fixed wxCheckListBox behaviour in presense of wxLB_SORT style (bug 529786)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-04-01 21:55:55 +00:00
parent f88c1a172e
commit fd7ab28c5e
4 changed files with 21 additions and 37 deletions

View File

@@ -60,7 +60,7 @@
// implementation
// ============================================================================
IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox)
IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox)
// ----------------------------------------------------------------------------
// declaration and implementation of wxCheckListBoxItem class
@@ -299,26 +299,6 @@ void wxCheckListBox::Delete(int N)
m_aItems.RemoveAt(N);
}
void wxCheckListBox::InsertItems(int nItems, const wxString items[], int pos)
{
wxCHECK_RET( pos >= 0 && pos <= m_noItems,
wxT("invalid index in wxCheckListBox::InsertItems") );
wxListBox::InsertItems(nItems, items, pos);
int i;
for ( i = 0; i < nItems; i++ ) {
wxOwnerDrawn *pNewItem = CreateItem((size_t)(pos + i));
pNewItem->SetName(items[i]);
pNewItem->SetFont(GetFont());
m_aItems.Insert(pNewItem, (size_t)(pos + i));
ListBox_SetItemData((HWND)GetHWND(), i + pos, pNewItem);
}
}
bool wxCheckListBox::SetFont( const wxFont &font )
{
size_t i;