关于生成richedit控件的问题,麻烦解答一下

gjjguown 2008-03-19 10:09:24
unit Unit2;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
Newre:array of TRichEdit;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
i,t:integer;

begin
t:=0 ;
for i:=1 to 4 do
begin
Newre[i]:=TRichEdit.Create(Self);
Newre[i].parent:=self;
Newre[i].height:=25;
Newre[i].left:=80;
Newre[i].width:=185;
Newre[i].top:=t+50;
end;
end;

end.
...全文
34 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
gjjguown 2008-03-19
  • 打赏
  • 举报
回复
程序运行后出错:
Newre[i]:=TRichEdit.Create(Self);

麻烦帮忙解决一下

829

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧