最好给实例!
解决方案 »
- Delphi5 的安装问题
- 弱弱的问delphi编写程序后安装问题
- 我用D写了个webservice的dll,发布到网站,但每次更新dll的时候,必须停掉IIS服务,如果我是租用的空间,那不是一点办法都没有?这个该如
- 很高兴!散分
- 如何更改指定文件的头文件!高分求教(比较有难度,是高手的请进!分不够再加)
- 选种DBGrid中的某一格,如何让这一格所在的行都呈被选中的状态(变成被选中的那种兰色)
- 求师
- 这个表应该怎么建?
- 用ADOQuery读取10000万记录的excel文件,速度问题请教
- 怎么用DELPHI做图象的伪彩处理?
- 请问在Delphi中调试退出程序后,能否查看到程序的泄漏情况?
- 帮帮忙啊,确实没有办法了,打印问题
aList:TStringList;
Published
Property FaList Read aList Write aList;Public
Procedure Create(AOwner:TObject);override;Implementation
procedure Create(AOwner:TObject);
begin
aList:=TStringList.Create(Self);
end;
TMyClass = class(URCLASS)
private
FSubList:TList;
Published
Property SubList: TList Read FSubList Write FSubList;
Public
//构造函数
Contructor Create(AOwner:TComponent);
//析构函数
Destructor Destroy;override;
//在list里增加自定义的类(TSubClass)
function AddSubClass: TSubClass;
Implementation
Constructor TMyClass.Create(AOwner:TComponent);
begin
inherited Create(AOwner);
FSubList := TList.Create;
end;function TMyClass.AddSubClass: TSubClass;
begin
Result := TSubClass.Create;
...
FSubList.Add(Result);
end;Destructor TMyClass.Destroy;override;
begin
//释放list内元素
while FSubList.Count > 0 do
begin
TSubClass(FSubList[0]).Free;
FSubList.Delete(0);
end;
FSubList.Free;
inherited;
end;