请问如何StringGrid中,按下Ctrl用鼠标进行多选.请高手指点。

解决方案 »

  1.   

    不知要实现什么功能
    或许其他方法可以实现
    比如sql server选择连接服务器地对话框就很好
      

  2.   

    其实有一个简单的办法,就是StringGrid的第一列空着,留做标志列。如果想选择某一行,那么双击就在这一行的第一列加上标志为T,否则取消标志T。这样通过判断第一列的值就可以实现多选效果。
      

  3.   

    不知对你有没帮助
    procedure TForm1.Button1Click(Sender: TObject);
    var
      rc: TGridRect;
    begin
      rc.Left := 1;
      rc.Top := 1;
      rc.Right := 5;
      rc.Bottom := 2;
      StringGrid1.Selection := rc;end;
      

  4.   

    F...不用啦..有一个选项难道你没有看到..
    在OPTION下面有一个psMultiSelected..
    你找一下不就得了..唉..
      

  5.   

    在OPTION下面有一个psMultiSelected..
    你找一下不就得了..唉..
      

  6.   

    不知对你有没帮助
    procedure TForm1.Button1Click(Sender: TObject);
    var
      rc: TGridRect;
    begin
      rc.Left := 1;
      rc.Top := 1;
      rc.Right := 5;
      rc.Bottom := 2;
      StringGrid1.Selection := rc;end;
      

  7.   

    设TStringGrid的Optins属性的goRowSelect为ture就可以多选了
    在编码中TStringGrid.Selection返回的矩形对象为你多选的那个矩形区域
      

  8.   

    我怎么看不到Options中的dgmultiselect或goRowSelect选项,我用的是delphi6,StringGrid控件。
      

  9.   

    DELPHI中也没有dgmultiselect,只有goRowSelect啊,而且选中goRowSelect后就不能编辑了,为什么?