Hello Roland.
Yep, yep, yep, I think I get it.
The trick is to use this to create the face: dynedit.face :=
tface.create(self);
_______________________
procedure tmainfo.mainformcreated(const sender: TObject);
begin
dynedit := tedit.Create(self);
dynedit.bounds_cx := 100;
dynedit.bounds_cy := 21;
{.$define use_existing_frame}
{$IFDEF use_existing_frame}
dynedit.frame := tedit1.frame;
{$ELSE}
dynedit.frame := tcaptionframe.create(iscrollframe(self));
dynedit.frame.caption := 'Hello';
dynedit.face := tface.create(self); // here change
dynedit.face.fade_color.count := 2;
dynedit.face.fade_color[0] := cl_ltgreen;
dynedit.face.fade_color[1] := cl_dkgreen;
dynedit.face.fade_direction := gd_down;
{$ENDIF}
insertwidget(dynedit, makepoint(8, 48));
dynedit.show;
end;
procedure tmainfo.mainformdestroy(const sender: TObject);
begin
dynedit.free;
end;
___________________
Heap dump by heaptrc unit of /home/fred/memoryleak/dynedit
1122 memory blocks allocated : 201244/203552
1122 memory blocks freed : 201244/203552
0 unfreed memory blocks : 0
True heap size : 131072
True free heap : 131072
;-)
Fre;D
--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk