View Issue Details

IDProjectCategoryView StatusLast Update
0023661LazarusLCLpublic2013-02-03 01:58
ReporterIan Goddard Assigned ToJesus Reyes  
Status assignedResolutionopen 
Product Version1.0.4 
Summary0023661: TStringGrid focus issue
DescriptionThere exists a condition in which the grid has focus but no cell has an explicit focus. Nevertheless a cell does have an implicit focus.

One instance is when the grid is first displayed and has the lowest tab order value or when it has been tabbed to from another control. If the user has previously had the cursor on a specific cell of the grid and tabs back from another control then that cell receives the implicit focus, otherwise it goes to the first cell.

Another is when the user is navigating the grid by tab, has reached the last tabbable cell and presses tab again. If there is another control to which focus can pass then it will do so, otherwise the focus remains on the grid, the last cell visited loses explicit focus but retains implicit focus.

In each case each successive key press will overwrite the contents of the cell with the implied focus.

If the cell is empty the subsequent behaviour looks odd but is harmless. If the user tries to type in a series of characters the cell simply displays a single character, replacing it each time the key is pressed.

If, however, the user has already entered data in the cell this data will be overwritten by the next key press. The user would probably not consider this behaviour harmless. There is no visual feedback to the user to indicate that the cell contents are vulnerable in this way.

There a three alternatives to minimise the impact of this.

1. The situation left as it is at present but with the contents at risk highlighted.

2. The cell should have explicit focus and behave appropriately. If the cell has already had data entered the cursor should returned be at its last known position if that's possible.

3. If no cell has explicit focus any keys other then navigation keys should be ignored.
TagsNo tags attached.
Fixed in Revision
WidgetsetGTK 2
Attached Files


related to 0023652 resolvedJesus Reyes Adding stringgrid row causes onValidate event to fail 


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2013-01-16 13:08 Ian Goddard New Issue
2013-01-16 13:08 Ian Goddard Widgetset => GTK 2
2013-01-16 18:49 Juha Manninen Relationship added related to 0023652
2013-02-03 01:58 Jesus Reyes Assigned To => Jesus Reyes
2013-02-03 01:58 Jesus Reyes Status new => assigned