请大虾帮忙--非常急(有关stringgrid的问题) stringgrid变化就意味着要重画!onDrawCell 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 onDrawCell时和原Cell[i,j]值比较作判断 OnSetEditText occurs every time the user changes the text.type TSetEditEvent = procedure (Sender: TObject; ACol, ARow: Longint; const Value: String) of object;property OnSetEditText: TSetEditEvent;响应它吧。 agui 大虾,请问你这个属性怎么使用啊,还有read,write域呢?请在指教! 请再问,我如何利用onsetedittext来实现opendialog和savedialog的"打开"与"保存"事件呢?还有在我的"新建 "(newclick)事件中,我又怎知道或如何判断cells的内容的改变呢.可否给一个具体的实列呢 再请问大虾,我如何可以实现用onsetedittext来实现opendialog和savedialog的"打开"和"保存"事件呢?还有,我的"新建"事件(newclick)中,怎样判断cells的内容改变,以便作新存贮.可否给我一个这方面的实列---非常感谢!! 察看TCustomGrid的以下几个方法:function GetEditText(ACol, ARow: Longint): string; dynamic;procedure SetEditText(ACol, ARow: Longint; const Value: string); dynamic;等等等等。最好查一查“FInplaceEditor”相关的方法。然后自己写一个类重载他 我又看了一下,好像用OnGetEditText这个事件就行了 数字蛋糕大虾:我用了ongetedittext事件可是在程序执行中,却没有执行其中的内容请问是怎么回事啊?我的程序如下:一个stringgrid,opendialog和savedialog组件;procedure TForm1.StringGrid1GetEditText(Sender: TObject; ACol, ARow: Integer; var Value: String);begin savedialog1.execute; if savedialog1.Execute and ( messagedlg('save file?',mtconfirmation,mbYesNoCancel,0)=mrYes)then form2.show;end;form2的程序为:unit openandsaveu2;interfaceuses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm2 = class(TForm) Label1: TLabel; Edit1: TEdit; Label2: TLabel; Edit2: TEdit; Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); //procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form2: TForm2;implementationuses openandsaveu;{$R *.DFM}procedure TForm2.Button1Click(Sender: TObject);var i,j,k,lineNo:integer; atextfile:system.text; textLine:string;begin i:=strtoint(edit1.text); j:=strtoint(edit2.text); with form1 do begin //// if savedialog1.execute then begin assignfile(atextfile,savedialog1.filename); rewrite(atextfile); for k:=i to j do begin textline:=stringgrid1.cells[1,k]; writeln(atextfile,textline); end; closefile(atextfile); end; end;/////end;end.请指点指点!! DataSnap 无法联接Sqlserver 运行期对象对象属性列表怎么实现? 有谁做过采购系统?头都想大了 关于series 关于用MediaPlayer控件的问题! 如何设置sql server2000中的日期格式? treeview问题,急!求助高手! 超级难题,怎样修改FLASH的右键弹出菜单? 请问richedit一共能输入多长的text啊? XE上安装控件CoolTrayIcon不能支持64位。 如何实现类似ACDSEE中的图象预览 向数据库中插入调试纪录
property OnSetEditText: TSetEditEvent;响应它吧。
还有在我的"新建 "(newclick)事件中,我又怎知道或如何判断cells的内容的改变呢.
可否给一个具体的实列呢
还有,我的"新建"事件(newclick)中,怎样判断cells的内容改变,以便作新存贮.
可否给我一个这方面的实列---非常感谢!!
function GetEditText(ACol, ARow: Longint): string; dynamic;
procedure SetEditText(ACol, ARow: Longint; const Value: string); dynamic;
等等等等。最好查一查“FInplaceEditor”相关的方法。
然后自己写一个类重载他
请问是怎么回事啊?
我的程序如下:一个stringgrid,opendialog和savedialog组件;
procedure TForm1.StringGrid1GetEditText(Sender: TObject; ACol,
ARow: Integer; var Value: String);
begin
savedialog1.execute;
if savedialog1.Execute and ( messagedlg('save file?',mtconfirmation,mbYesNoCancel,0)=mrYes)then
form2.show;
end;form2的程序为:unit openandsaveu2;interfaceuses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;type
TForm2 = class(TForm)
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
Edit2: TEdit;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
//procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form2: TForm2;implementationuses openandsaveu;{$R *.DFM}procedure TForm2.Button1Click(Sender: TObject);
var
i,j,k,lineNo:integer;
atextfile:system.text;
textLine:string;
begin
i:=strtoint(edit1.text);
j:=strtoint(edit2.text); with form1 do
begin ////
if savedialog1.execute then
begin
assignfile(atextfile,savedialog1.filename);
rewrite(atextfile);
for k:=i to j do
begin
textline:=stringgrid1.cells[1,k];
writeln(atextfile,textline);
end;
closefile(atextfile);
end;
end;/////end;end.请指点指点!!