Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Print problem

Posted on 1999-07-12
3
Medium Priority
?
160 Views
Last Modified: 2010-04-06
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;

0
Comment
Question by:m_adil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Expert Comment

by:pede
ID: 1387742
Hi

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

/Pede


0
 
LVL 1

Author Comment

by:m_adil
ID: 1387743
Ooooh I forgot that.
Its working now!!
Thanks
0
 
LVL 1

Accepted Solution

by:
pede earned 60 total points
ID: 1387744
Sounds good ;) I guess I can make it an answer then.

/Pede

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question