cell.BackgroundColor = new itext.BaseColor(235,235,235); 

or 

cell.BackgroundColor = new 
itext.BaseColor(System.Drawing.Color.FromArgb(235,235,235)); 

Paulo

> -----Original Message-----
> From: H_L [mailto:[email protected]] 
> Sent: Tuesday, December 22, 2009 10:39 AM
> To: [email protected]
> Subject: [iText-questions] Problems with BackgroundColor in PdfPCell
> 
> 
> Hi
> 
> I want to generate the background color in my PdfPCell by 
> myself. But it
> doesn't work. What's wrong? May I missing the forest through 
> the trees...
> 
> My Code:
> PdfPCell cell = new PdfPCell(new Paragraph("Test", f9_curier));
> cell.BackgroundColor = itext.BaseColor.LIGHT_GRAY; //it works
> cell.BackgroundColor = 
> System.Drawing.Color.FromArgb(235,235,235); //it
> doesn't work
> 
> Message:
> An implicit conversion from type "System.Drawing.Color" to
> "iTextSharp.text.BaseColor" is not possible.
> 
> The cell.BackgroundColor needs a "BaseColor". Nevertheless is 
> there a way to
> deal with it?
> 
> Hope you can help me...
> 
> Grettings
> Henry


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to