We value your feedback.

Take our survey and automatically be enter to win anyone of the following:

Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

var

C, R: integer;

gr: TGridRect;

begin

with StringGrid1.ScreenToClient

StringGrid1.MouseToCell(X,

with StringGrid1 do begin

if (C < FixedCols) and (R < FixedRows) then

begin

// select all

gr.Left := FixedCols;

gr.Top := FixedRows;

gr.Bottom := RowCount;

gr.Right := ColCount;

Selection := gr;

end else

if C < FixedCols then begin

// Select row

gr.Left := FixedCols;

gr.Right := ColCount;

gr.Top := R;

gr.Bottom := R;

Selection := gr;

end else

if R < FixedRows then begin

// Select col

gr.Left := C;

gr.Right := C;

gr.Top := FixedRows;

gr.Bottom := RowCount;

Selection := gr;

end;

end;

end;

wbr, mo.