StringGrid loses focus if cell is selected programmatically if the StringGrid is not the first tab-able component
Original Reporter info from Mantis: gparsons
-
Reporter name:
Original Reporter info from Mantis: gparsons
- Reporter name:
Description:
If a StringGrid is not the first tab-able component, when the cell is changed programatically from within a custom editor the StringGrid will lose focus.
This can lead to unexpected, and unwanted behaviour and requires additional coding to mitigate.
Steps to reproduce:
See attached file containing amended gridcelleditor demo.
When StringGrid is TabOrder 0 it exhibits the expected, correct behaviour. The next cell is selected when Tab or Return is pressed and the user can enter data.
However, if TabOrder is changed to 2 or 3, pressing Tab or Return will select the next cell, but then the focus is immediately lost. This can be mitigated by adding ComboBox1.SetFocus after cell selection but this is undesirable as there may be many columns each with different custom editors.
Also, if the StringGrid is placed into a PageControl it will always exhibit the undesirable bahaviour even if it is TabOrder 0.
Mantis conversion info:
- Mantis ID: 24245
- OS: Windows 7
- Platform: Windows
- Version: 1.0.8
- Fixed in version: 1.1 (SVN)
- Fixed in revision: 40785 (#9d124013)
- Target version: 1.2.0
- LazTarget: 1.2