Print contents of TPanel at runtime [duplicate]

  

This question is an exact duplicate of:

Save TPanel as image on disk

1 answer

I’m creating an application in Delphi XE5 Firemonkey for cross platform. There I’m using a
TPanel to assign components on runtime in it like TLabel, TImage etc.
The problem is that when I use the TPanel on Design time and after creating all children if I use Panel.MakeScreenshot then everything works. i.e. i can see all controls in the bitmap.
But, when I create TPanel also at runtime and then add children to it and then use MakeScreenShot of Panel, it is not showing any control in the bitmap.

Basically, I need to print all the controls in bitmap format added at runtime in TPanel without showing them on GUI.

Comments are closed.