Re: selection in string grid


Posted by Jean-Claude Servaye on September 22, 2000 at 16:43:40:

In Reply to: selection in string grid posted by alex on September 15, 2000 at 12:02:04:

: How can i assign valus to StringGrid.Selection.Left, .Right, .Top and .Bottom in order to set a selection in the grid.thanks for your help! alex@daskalos.com

The following code selects the rectangle containing rows 1 through 4, and columns 2 and 3.
From the Delphi Help (TStringGrid)

procedure TForm1.Button1Click(Sender: TObject);
var
myRect: TGridRect;
begin
myRect.Left := 3;
myRect.Top := 1;
myRect.Right := 2;
myRect.Bottom := 4;
DrawGrid1.Selection := myRect;
end;


Related Articles and Replies: