I am having problems understanding the Row and Col results I get when I select a range of cells in an AdvStringGrid.
If I monitor the ARow & ACol values from the OnSelectCell event I get the expected results when I just click in a cell. However if I monitor the Grid.Row/Col, Grid.SelectedRow/ColCount properites or select a range of cells using Shift-click the results seem illogical to me:
The Grid.Row / Grid.Col, Grid.SelectedRow / Grid.SelectedColCount and Grid.Selection properties are changed to the position of the cell or size of block that has just been left.
All seven properties/values are only updated when Shift is not used.
e.g. Click @ 0,0 then Shift-click @ 2,2: ARow & ACol are 0,0; the others are still for the cell clicked before 0,0. Click @ 1,1: Arow & ACol are now 1,1, .Row & .Col are 0,0 and .SelectRow/ColCount are 3,3
Am I doing something wrong? I have tried this with a very simple test app with everything in it's default state so I don't think it can be some odd setting I have messed up.
How can I get the current range of a cell selection when I Shift-click at the end of the range?