RB 14
Greetings,
Up to RB 12.05 Pro I have been using several custom components that I've
made that draws directly to either the printer canvas or the screen canvas.
With RB 14 TppScrollableScreenDevice is new. I've tried drawing to its
canvas with no success. In the Report Designer - Preview my component does
not show up unless I set the report's preview form setting to single page.
Is there another canvas that I need to be drawing to?
I am currently using Delphi 2007, RB 14, Windows 7 Ultimate.
Regards,
Tommy Dillard
Up to RB 12.05 Pro I have been using several custom components that I've
made that draws directly to either the printer canvas or the screen canvas.
With RB 14 TppScrollableScreenDevice is new. I've tried drawing to its
canvas with no success. In the Report Designer - Preview my component does
not show up unless I set the report's preview form setting to single page.
Is there another canvas that I need to be drawing to?
I am currently using Delphi 2007, RB 14, Windows 7 Ultimate.
Regards,
Tommy Dillard
This discussion has been closed.
Comments
If you have a DrawCommand descendant class, with some code like this...
function TmyDrawCommand.Draw(aDevice: TppDevice): Boolean;
begin
...
else if (aDevice is TppScreenDevice) then
begin
lCanvas := TppScreenDevice(aDevice).Canvas
end
end
then you will need to change it to this..
uses
ppGraphicsDevice;
.....
else if (aDevice is TppGraphicsDevice) then
begin
lCanvas := TppGraphicsDevice(aDevice).Canvas
end;
TppGraphicsDevice was introduced in RB 12 and is the ancestor of any device
that renders to a canvas. For RB 14 the hierachy looks like this...
TppDevice
TppGraphicsDevice
TppCustomScreenDevice
TppScreenDevice
TppScrollableScreenDevice
Sorry that I did not think of this when you emailed support@ last week,
reading the wording of this post about 'drawing to the canvas' triggered in
my mind what has changed from the DrawCommand perspective.
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Thank you.
Best Regards,
Tommy Dillard