delphi,点击Add,按钮,编辑框中显示和,能运行,但是我点击按钮没反应,这段代码该写在哪个位置啊???
unitUnit2;interfaceusesWindows,Messages,SysUtils,Variants,Classes,Graphics,Controls,F...
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Add: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
end.
var
Value,Sum :Integer;
Line : String;
procedure TForm1.addClick(Sender: TObject);
var
X,Y:Integer;
begin
X:=100;
Y:=20;
Edit1.text:=IntToStr(X+Y);
end; 展开
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Add: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
end.
var
Value,Sum :Integer;
Line : String;
procedure TForm1.addClick(Sender: TObject);
var
X,Y:Integer;
begin
X:=100;
Y:=20;
Edit1.text:=IntToStr(X+Y);
end; 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询