How To…Use the PaintBox Component

Question

“How is the PaintBox component meant to be used?”

Solution

The PaintBox component is a report control that can be used to draw directly to a Canvas. Use the TppPaintBox.Canvas property to draw text, lines, images, etc. Use the OnPrint event to draw to the canvas. The example below shows how the TppPaintBox component might be used to create shapes and text that might otherwise be impossible using other report components.

Download: PaintBox.zip

Sample Delphi code: