1. restored wxEvent::operator=()

2. removed wxListEvent::CopyObject()
3. refresh fixes to MSW virtual list control


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-11-21 00:43:54 +00:00
parent 050c9e3c90
commit 2d33aec94c
4 changed files with 109 additions and 84 deletions

View File

@@ -760,7 +760,8 @@ void MyListCtrl::OnListKeyDown(wxListEvent& event)
{
switch ( event.GetCode() )
{
case 'c':
case 'c': // colorize
case 'C':
{
wxListItem info;
info.m_itemId = event.GetIndex();
@@ -772,10 +773,29 @@ void MyListCtrl::OnListKeyDown(wxListEvent& event)
info.SetTextColour(*wxCYAN);
SetItem(info);
RefreshItem(info.m_itemId);
}
}
break;
case 'n': // next
case 'N':
{
long item = GetNextItem(-1,
wxLIST_NEXT_ALL, wxLIST_STATE_FOCUSED);
if ( item++ == GetItemCount() - 1 )
{
item = 0;
}
wxLogMessage(_T("Focusing item %ld"), item);
SetItemState(item, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED);
EnsureVisible(item);
}
break;
case WXK_DELETE:
{
long item = GetNextItem(-1,
@@ -818,7 +838,18 @@ void MyListCtrl::OnChar(wxKeyEvent& event)
{
wxLogMessage(_T("Got char event."));
event.Skip();
switch ( event.GetKeyCode() )
{
case 'n':
case 'N':
case 'c':
case 'C':
// these are the keys we process ourselves
break;
default:
event.Skip();
}
}
void MyListCtrl::LogEvent(const wxListEvent& event, const wxChar *eventName)