How To…Use the PaintBox Component


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


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.


Sample Delphi code: