Edit1Enter事件无法触发的问题
代码如下procedure TForm1.Edit1Enter(Sender: TObject);
begin
showmessage('请输入右边显示的验证码');
Button5.Enabled:=ture;
end;
但是edit1获得焦点后
没有信息出来
button5还是false
请教问题出在哪?
这是我调试的程序,可以实现
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Edit1: TEdit;
procedure Edit1Enter(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Edit1Enter(Sender: TObject);
begin
button1.Enabled:=true;
end;
end.