Hi all,
may be somebody out there is able to help me with this nasty (last )
problem I have :
I do have an object called TSession :
-------------------------------------------------------------
type
TSession = class(TGraphicControl)
private
{ Private declarations }
protected
{ Protected declarations }
procedure Paint; override;
public
{ Public declarations }
published
{ Published declarations }
end;
---------------------------------------------------------------
the paint of TSession looks like this :
---------------------------------------------------------------
procedure TSession.Paint;
var width2, height2 : integer;
begin
inherited Paint;
Canvas.pen.color:=clblack;
Canvas.pen.width := 2;
Canvas.Brush.color:=clwhite;
Canvas.Brush.style:=bsSolid;
Canvas.Polygon([Point(0, 0),
Point(Width-1, 0),
Point(Width-1, Height-1),
Point(0, Height-1),
Point(0, 0)]);
end;
---------------------------------------------------------------
I do have a form with a scrolbox called Scrollbox1.
I than create a TSession object like this :
---------------------------------------------------------------
Session := TSession.create(self);
Session.Parent := scrollbox1 ;
---------------------------------------------------------------
and than I position the session at a certain position
, and this is very important, OUTSIDE
the view window of the scroll box, i.e. :
---------------------------------------------------------------
Session.Top := 2000;
Session.Left := 2000;
Session.width = 100;
Session.Height = 100;
---------------------------------------------------------------
{ in order to see this object I need to scroll to the left and down
using the scroll bars at bottom and left hand side !!! }
I tried a while ago to save a jpeg dump to a file of the scroll box's
contents
that contained multiple TSession objects : some of them were
outside the viewing window of the scrollbox : the result
is that I ONLY see information dumped that is actually shown
inside the scrollbox's viewing window ( which is THE problem I have
and what this posting is all about !!! )
Is there somebody that can tell me how to dump the complete canvas
of a scrollbox including the area that is outside the scrollbox viewing
window in ideally in GIF or otherwise BMP/JPEG format??????
Any help/hints is greatly appreciated!!!!!!!!
Many thanks in advance.
Antoni
I'm somewhat surprised that it doesn't work. Perhaps there's
a bug in TScrollBox's disk persistence code so that it saves
visible instead of extant data. You should be able to override
that; it's all done with TStreams and TReaders and TWriters
and virtual methods. Read through the VCL source to find out
how loading and saving .dfm files is done, and customise it.
(You _are_ talking about .dfm stuff, right?)
Groetjes,
Maarten Wiltink