Make Home and End keys work as expected in wxGrid.
Go to the first/last cell of the current row when they're pressed instead of starting the editor. Closes #12222. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		| @@ -4669,25 +4669,15 @@ void wxGrid::OnKeyDown( wxKeyEvent& event ) | |||||||
|                 break; |                 break; | ||||||
|  |  | ||||||
|             case WXK_HOME: |             case WXK_HOME: | ||||||
|                 if ( event.ControlDown() ) |                 GoToCell(event.ControlDown() ? 0 | ||||||
|                 { |                                              : m_currentCellCoords.GetRow(), | ||||||
|                     GoToCell(0, 0); |                          0); | ||||||
|                 } |  | ||||||
|                 else |  | ||||||
|                 { |  | ||||||
|                     event.Skip(); |  | ||||||
|                 } |  | ||||||
|                 break; |                 break; | ||||||
|  |  | ||||||
|             case WXK_END: |             case WXK_END: | ||||||
|                 if ( event.ControlDown() ) |                 GoToCell(event.ControlDown() ? m_numRows - 1 | ||||||
|                 { |                                              : m_currentCellCoords.GetRow(), | ||||||
|                     GoToCell(m_numRows - 1, m_numCols - 1); |                          m_numCols - 1); | ||||||
|                 } |  | ||||||
|                 else |  | ||||||
|                 { |  | ||||||
|                     event.Skip(); |  | ||||||
|                 } |  | ||||||
|                 break; |                 break; | ||||||
|  |  | ||||||
|             case WXK_PAGEUP: |             case WXK_PAGEUP: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user