Phil Garnes
Just set the StringGrid's Row and Col properties and call
StringGrid.SetFocus.
--
Wayne Niddery - WinWright Consulting
Delphi, C++Builder, JBuilder, InterDev -- Amazon.com Associate
at http://home.ican.net/~wniddery/RADBooks.html
--- CUT ---
.... another answer from "Lutz Lohnstein" <LLohn...@KHK.de>
Hi Ken, try this
to select Cell[2,3] you have to set the selection-property of the grid.
MyGrid.Selection := tGridRect(Rect(2,3,2,3));
hope this helps
Phillip Garnes wrote:
> How do I do it programatically?
If you only need to do single cell selection:
StringGrid.Col := 2;
StringGrid.Row := 1;
For multiple cell selection:
var
GridRect: TGridRect;
begin
GridRect.Top := 1;
GridRect.Left := 1;
GridRect.Right := 3;
GridRect.Bottom := 2;
StringGrid1.Selection := GridRect;
end;
--
Rick Rogers (TeamB) | Fenestra Technologies
http://www.fenestra.com/