+ -
当前位置:首页 → 问答吧 → StringGrid控件的问题

StringGrid控件的问题

时间:2011-11-28

来源:互联网

在StringGrid中,用鼠标拖动选择了多row,在程序中如何知道那些row被选中了?谢谢!

作者: tls3511   发布时间: 2011-11-28

The following code selects the rectangle containing rows 1 through 4, and columns 2 and 3.

void __fastcall TForm1::Button1Click(TObject *Sender)

{
  TGridRect myRect;
  myRect.Left = 3;
  myRect.Top = 1;
  myRect.Right = 2;
  myRect.Bottom = 4;
  DrawGrid1->Selection = myRect;
}

作者: mgsg   发布时间: 2011-11-28