各位请进!关于对象属性的问题???面对对象 我需要写一个对象,其中有两个属性,一个是富文本(字数较多,每个字都可能大小颜色等不同),一个图片。对象要存储到一个文件里去。小弟不知道怎么样属性声明才能做到我要的效果???请高手帮忙 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 type TChildClass = class(TParentClass) private FRichEdit: TRichEdit; FImage: TImage; protected procedure Notification(AComponent: TComponent; Operation: TOperation); override; published property RichEdit: TRichEdit read FRichEdit write FRichEdit; property Image: TImage read FImage write FImage; end;implementationprocedure TChildClass.Notification(AComponent: TComponent; Operation: TOperation);begin inherited Notification(AComponent, Operation); if Operation = opRemove then begin if AComponent = FRichEdit then FRichEdit := nil else if AComponent = FImage then FImage := nil; end;end;————————————————————————————————————宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。———————————————————————————————————— 我想知道怎么write?这些图片和文本属性要和其它属性存储到一个文件中。 求平安! 请问:在TPanel上显示图像后,为什么就不能实现拖动了? 保存不进去 应用程序的版本问题 怎样用sql做一个 交叉表??? 最后的90分 特急!关于Install Shield!!! 请教一个sql语句的写法 检测服务器某个端口是否打开? 怎样实现象Winzip等软件一样,安装后在资源管理器里点右键可以选择运行? 关于Sqlserver2000数据库的问题! 【各位帮忙,学习delphi的方法和方向!】
TChildClass = class(TParentClass)
private
FRichEdit: TRichEdit;
FImage: TImage;
protected
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
published
property RichEdit: TRichEdit read FRichEdit write FRichEdit;
property Image: TImage read FImage write FImage;
end;implementationprocedure TChildClass.Notification(AComponent: TComponent;
Operation: TOperation);
begin
inherited Notification(AComponent, Operation);
if Operation = opRemove then
begin
if AComponent = FRichEdit then FRichEdit := nil
else if AComponent = FImage then FImage := nil;
end;
end;————————————————————————————————————
宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。
————————————————————————————————————