StringGrid 控件 默认没有选定单元格 ,设定那个属性 StringGrid 控件 默认没有选定单元格 ,设定那个属性 然后怎样判断是否 选定 某个单元格 用什么判断??谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不明白你要做什么?Row,Col属性应时当前选定的单元格啊,默认选定(1,1)单元格判断是否选定(Col,Row)单元格,自己写个函数就行了unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons, Grids;type TForm1 = class(TForm) StringGrid1: TStringGrid; BitBtn1: TBitBtn; procedure BitBtn1Click(Sender: TObject); private { Private declarations } public { Public declarations } function isSelect(Row,Col: integer): boolean; end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.BitBtn1Click(Sender: TObject);begin showMessage(inttostr(stringgrid1.Row)+','+inttostr(stringgrid1.Col)); ShowMessage(booltoStr(isSelect(3,3)));end;function TForm1.isSelect(Row, Col:integer): boolean;begin Result:= (StringGrid1.Row=Row) and (StringGrid1.Col=Col);end;end. 如何激活Form DLL创建窗体隐藏标题栏(急) Delphi编写的dll在C++Builder中的调用问题! 跪求Rave开发的打印Chart图和一些生成Chart图的过滤条件的报表原程序! 请教打印机问题 怎么调用这个函数?请指教! while...do...里怎样在程序中间终止并继续循环? 有谁知道borland公司 追究盗版的事宜! 如何响应全部程序最小化? 菜鸟请教一个问题 讨论三层分布式应用中Socket连接方式的安全性问题 关于将Excel表的数据导入到SQL Server中的问题!
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, Grids;type
TForm1 = class(TForm)
StringGrid1: TStringGrid;
BitBtn1: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
function isSelect(Row,Col: integer): boolean;
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.BitBtn1Click(Sender: TObject);
begin
showMessage(inttostr(stringgrid1.Row)+','+inttostr(stringgrid1.Col));
ShowMessage(booltoStr(isSelect(3,3)));
end;function TForm1.isSelect(Row, Col:integer): boolean;
begin
Result:= (StringGrid1.Row=Row) and (StringGrid1.Col=Col);
end;end.