Delphi TStringGrid multi select, definition of selected rows

In any case, to determine which rows are currently selected in multi-select TStringGridor TCustomGrid. The property would be perfect.

I know that there is a property gdSelectedthat is set in the event DrawCell,

procedure DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState);

I can check AStatefor gdSelectedand track this in an array somewhere, but it looks like kludgey.

+2
source share
3 answers

, , goRangeSelect Options. Selection. ( ) a TRect, .

+3

Oooh, StringGrid.Selection.BottomRight.Y StringGrid.Selection.BottomRight.X .

+1

StringGrid.Selection.top , StringGrid.Selection.bottom , .

:

3 6 , StringGrid.Selection.top 3 StringGrid.Selection.bottom 6 , .

0

All Articles