J
johnpan
Unregistered / Unconfirmed
GUEST, unregistred user!
有个问题请教:
在某个程序中,我需要创建一列文字框,然后按照下标填入初值,程序如下:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
var
edits: array[0..2] of tedit;
i: integer;
begin
for i:=0 to 2 do
begin
edits:=Tedit.create(Form1);
edits.top:=30+i*25;
edits.left:=30;
edits.width:=130;
edits.height:=20;
edits.text:=inttostr(i+5);
end;
end;
end.
编译通过,但是执行时什么也看不到。为什么?
谢谢
在某个程序中,我需要创建一列文字框,然后按照下标填入初值,程序如下:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
var
edits: array[0..2] of tedit;
i: integer;
begin
for i:=0 to 2 do
begin
edits:=Tedit.create(Form1);
edits.top:=30+i*25;
edits.left:=30;
edits.width:=130;
edits.height:=20;
edits.text:=inttostr(i+5);
end;
end;
end.
编译通过,但是执行时什么也看不到。为什么?
谢谢