StringGrid 能不能做全部选中的操作? 我要在程序中控制StringGrid的所有行都选中。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 procedure TForm1.Button1Click(Sender: TObject);var myRect: TGridRect;begin myRect.Left := 1; // first selected grid. myRect.Top := 1; myRect.Right := 2; // cols myRect.Bottom := 4; // rows StringGrid1.Selection := myRect;end; 再改一下:procedure TForm1.Button2Click(Sender: TObject);var myRect: TGridRect;begin myRect.Left := StringGrid1.FixedCols; // first selected grid. myRect.Top := StringGrid1.FixedRows; myRect.Right := StringGrid1.ColCount - StringGrid1.FixedCols; // cols myRect.Bottom := StringGrid1.RowCount - StringGrid1.FixedRows; // rows StringGrid1.Selection := myRect;end; 请教这段代码有什么问题,关于tfilestream paintbox画图 有没有人在delphi6下用过spread7控件 我也散个分吧! 高手们小弟请教如何调用水晶报表的问题!十万火急! 有没有可以显示病人图标列表信息的控件?或以图标显示酒店房间信息的控件?下有示例 数据的完整性问题 怎样制作像delphi一样的启动欢迎画面? 用RAVE怎样打印表格 Delphi中如何一开始就隐藏主窗口? 同时清空30个edit 如何在delphi的RichEdit控件中插入图片和表格 ? ? ?
var
myRect: TGridRect;
begin
myRect.Left := 1; // first selected grid.
myRect.Top := 1;
myRect.Right := 2; // cols
myRect.Bottom := 4; // rows
StringGrid1.Selection := myRect;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
myRect: TGridRect;
begin
myRect.Left := StringGrid1.FixedCols; // first selected grid.
myRect.Top := StringGrid1.FixedRows;
myRect.Right := StringGrid1.ColCount - StringGrid1.FixedCols; // cols
myRect.Bottom := StringGrid1.RowCount - StringGrid1.FixedRows; // rows
StringGrid1.Selection := myRect;
end;