- listbox->m_spacePressed = false; //don't block selection behaviour anymore
-
- //Space was pressed - toggle the appropriate checkbox and the selection
-#if wxUSE_CHECKLISTBOX //Do it for both native and non-native
- if (listbox->m_hasCheckBoxes)
- {
- wxCheckListBox *clb = (wxCheckListBox *)listbox;
-
- clb->Check( sel, !clb->IsChecked(sel) );
-
- wxCommandEvent new_event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, listbox->GetId() );
- new_event.SetEventObject( listbox );
- new_event.SetInt( sel );
- listbox->GetEventHandler()->ProcessEvent( new_event );
- }
-#endif // wxUSE_CHECKLISTBOX
-
- if( (((listbox->GetWindowStyleFlag() & wxLB_MULTIPLE) != 0) ||
- ((listbox->GetWindowStyleFlag() & wxLB_EXTENDED) != 0)) )
- {
- //toggle the selection + send event
- if(listbox->IsSelected( sel ))
- listbox->GtkSetSelection(sel, FALSE, FALSE);
- else
- listbox->GtkSetSelection(sel, TRUE, FALSE);
- }