注册 登录
编程论坛 Delphi论坛

Edit1Enter事件无法触发的问题

p9998887778 发布于 2007-07-31 16:09, 789 次点击
代码如下

procedure TForm1.Edit1Enter(Sender: TObject);
begin
showmessage('请输入右边显示的验证码');
Button5.Enabled:=ture;
end;


但是edit1获得焦点后
没有信息出来

button5还是false

请教问题出在哪?
3 回复
#2
anthony6342007-08-08 13:28
环境有问题
#3
shp19972007-08-08 20:13

这是我调试的程序,可以实现

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.

#4
solidwater2007-08-10 20:19
那个ture是不是指true?
1