Link to home
Start Free TrialLog in
Avatar of m_adil
m_adil

asked on

Print problem

I want to print(on printer) a rectangle filled with yellow color and containing some text. Every thing in going fine except when I print the text with the font.color := clBlack, it comes with white back ground color on yellow rectangle. I want that background color of text should be the same as of the rectangle. I'm using this code with Delphi 3

Canvas.Font.Style := [fsBold]; Canvas.Font.Size := 14; Ā Canvas.Font.Name := 'Times';
Canvas.Brush.Color := clYellow;
Canvas.Rectangle(pgLeft, pgTop, PageWidth-pgLeft, pgTop+150);
Canvas.Textout((PageWidth div 2)-(Canvas.TextWidth(Fname) div 2), pgTop+40, Fname);
Canvas.Brush.Color := clWhite;

Avatar of pede
pede

Hi

Have you tried
Canvas.Brush.Style:=bsClear
just before the TextOut.

/Pede


Avatar of m_adil

ASKER

Ooooh I forgot that.
Its working now!!
Thanks
ASKER CERTIFIED SOLUTION
Avatar of pede
pede

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial