Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How can I do inverse selection in AdvStringGrid?
- PROCEDURE InvertSelection(Grid : TAdvStringGrid);
- VAR
- C,R : Cardinal;
- BEGIN
- IF Grid.MouseActions.DisjunctCellSelect THEN
- FOR R:=Grid.FixedRows TO PRED(Grid.RowCount) DO FOR C:=Grid.FixedCols TO PRED(Grid.ColCount) DO Grid.SelectedCells[C,R]:=NOT Grid.SelectedCells[C,R]
- ELSE IF Grid.MouseActions.DisjunctRowSelect THEN
- FOR R:=Grid.FixedRows TO PRED(Grid.RowCount) DO Grid.RowSelect[R]:=NOT Grid.RowSelect[R]
- ELSE IF Grid.MouseActions.DisjunctColSelect THEN
- FOR C:=Grid.FixedCols TO PRED(Grid.ColCount) DO Grid.ColSelect[C]:=NOT Grid.ColSelect[C]
- END;
Add Comment
Please, Sign In to add comment