1. wxRadioBox event generation fixed

2. significantly expanded and enchanced listbox sample
3. wxTextCtrl::IsModified() implemented
4. wxRadioBox button layout fixed once again
5. wxTextCtrl::SetValue() refresh bug fixed
6. wxListCtrl doesn't keep invalid selection after Delete()


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-10-08 23:12:36 +00:00
parent 943240b264
commit a3a13581dd
14 changed files with 267 additions and 43 deletions

View File

@@ -142,7 +142,7 @@ int wxListBox::DoAppend(const wxString& item)
}
}
RefreshItem(m_strings.GetCount() - 1);
RefreshFromItemToEnd(index);
return index;
}
@@ -171,7 +171,7 @@ void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
// note that we have to refresh all the items after the ones we inserted,
// not just these items
RefreshItems(pos, GetCount() - pos);
RefreshFromItemToEnd(pos);
}
void wxListBox::DoSetItems(const wxArrayString& items, void **clientData)
@@ -263,6 +263,10 @@ void wxListBox::Delete(int n)
{
wxCHECK_RET( n < GetCount(), _T("invalid index in wxListBox::Delete") );
// do it before removing the index as otherwise the last item will not be
// refreshed (as GetCount() will be decremented)
RefreshFromItemToEnd(n);
m_strings.RemoveAt(n);
if ( HasClientObjectData() )
@@ -273,8 +277,6 @@ void wxListBox::Delete(int n)
m_itemsClientData.RemoveAt(n);
m_updateScrollbarY = TRUE;
RefreshItems(n, GetCount() - n);
}
// ----------------------------------------------------------------------------
@@ -363,6 +365,11 @@ void wxListBox::Refresh(bool eraseBackground, const wxRect *rect)
wxControl::Refresh(eraseBackground, rect);
}
void wxListBox::RefreshFromItemToEnd(int from)
{
RefreshItems(from, GetCount() - from);
}
void wxListBox::RefreshItems(int from, int count)
{
switch ( m_updateCount )