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;
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
Canvas.Brush.Color := clWhite;
ASKER
Ooooh I forgot that.
Its working now!!
Thanks
Its working now!!
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Have you tried
Canvas.Brush.Style:=bsClea
just before the TextOut.
/Pede