[Lazarus] Custom GraphicsControl - need Canvas to set Height outside OnPaint

Petr Kristan petr.kristan at epos.cz
Mon Apr 7 12:56:37 CEST 2014


On Mon, Apr 07, 2014 at 11:11:28AM +0200, zeljko wrote:
> On 04/07/2014 11:01 AM, Petr Kristan wrote:
> >Hi.
> >
> >I'am creating an graphics control and I need Canvas to set control
> >Height. But I can draw (access to Canvas) only in OnPaint event.
> >
> >How to solve this problem?
> 
> You need to set height of control by calculating text height out of
> paint event ?  I'm using TBitmap for such measurements.
> Create bitmap, assign control font to bmp canvas, measure.

Tanks for fast helpfull responses.

Petr

-- 
Petr Kristan
.
EPOS PRO s.r.o., Smilova 333, 530 02 Pardubice
tel: +420 461101401    Czech Republic (Eastern Europe)
fax: +420 461101481




More information about the Lazarus mailing list