Is it possible with a wxGrid set to rowselect, that after a selection of a row by means of a mouseclick, you move the selection one row down with the up and down arrow keys. I added a
Code: Select all
EVT_KEY_DOWN( tcTBbrowse::OnKeyDown )
Code: Select all
nKey = ((wxKeyEvent&)event).GetKeyCode();
switch(nKey)
{
case WXK_F1: // Show info or help
this->GPopup(ccGevent);
break;
case WXK_F5: // Refresh content
this->RefreshContent();
break;
case WXK_UP: // Up arrow pressed
break;
case WXK_DOWN: // Down arror pressed
hGrid = XRCCTRL(*this, "TBBRWS_GRID", wxGrid);
anSel = hGrid->GetSelectedRows();
if (anSel.GetCount() > 0)
{
nRow = anSel.Item(0);
hGrid->SelectRow(nRow+1,true);
hGrid->Refresh();
}
break;
}
event.Skip();
I did create the wxGrid with rowselection and no editing cells.
Code: Select all
hGrid->SetSelectionMode(wxGrid::wxGridSelectRows);
hGrid->EnableEditing(false);
regards,
Nunki