如何在 TStringGrid 中启用多行选择

How to enable multiple row selection into a TStringGrid

我正在使用 C++Builder,但我无法使用鼠标 select 多行 TStringGrid

是否有 TStringGrid 中的特定 属性 启用此功能?

TStringGrid::Options 属性 中启用 goRangeSelectgoRowSelect 标志。

goRangeSelect
Users can select ranges of cells at one time. goRangeSelect is ignored if Options includes goEditing.

goRowSelect
Entire rows are selected rather than individual cells. If goRowSelect is included in Options, goAlwaysShowEditor has no effect.