By Date: <-- -->
By Thread: <-- -->

New Line for a table



I don't see any problem there, it's just an application issue. Maybe you
should collect the data in advance before adding it to the cells to be
able to decide what goes into a new row.

Paulo 

> -----Original Message-----
> From: Krishna Prasad V [mailto:kp.kashyap (at) gmail.com] 
> Sent: Wednesday, February 08, 2006 11:29 AM
> To: Paulo Soares
> Subject: RE: [iText-questions] New Line for a table
> 
> Thanks for your quick reply. Please see the code below...
> 		Table tblHeader = new Table(4);
> 		tblHeader.setBorderWidth(1);
> 		tblHeader.setWidth(100);
> 		tblHeader.setBorderColor(new Color(0x0, 0x0, 0x0));
> 		Table table = new Table(4);
> 
> 		cell = new Cell(new Chunk("Name : ", fontBold));
> 		cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
> 		cell.setBorderWidth(0);
> 	    	cell.setLeading(fLeading);
> 		table.addCell(cell);
> 		
> 		cell = new Cell(new Chunk(workData.getName(), 
> fontData));
> 		cell.setBorderWidth(0);
> 	    	cell.setLeading(fLeading);
> 		table.addCell(cell);
> 	
> 	if(!(""equalsIgnoreCase(workData.getPosition())))
> 	{
> 		cell = new Cell(new Chunk("Positon : ", fontBold));
> 		cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
> 		cell.setBorderWidth(0);
> 	    	cell.setLeading(fLeading);
> 		table.addCell(cell);
> 		
> 		cell = new Cell(new Chunk(workData.getPosition(),
> fontData));
> 		cell.setBorderWidth(0);
> 	    	cell.setLeading(fLeading);
> 		table.addCell(cell);
> 	}
> 	Else
> 	{
> 	cell = new Cell(new Chunk("\n", fontData)); // Is this 
> code right?
> 	cell.setBorderWidth(0);
>     	cell.setLeading(fLeading);
> 	table.addCell(cell);
> 	}
> 		
> 	cell = new Cell(new Chunk("Contact Person : ", fontBold));
> 	cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
> 	cell.setBorderWidth(0);
> 	cell.setLeading(fLeading);
> 	table.addCell(cell);
> 		
> 	cell = new Cell(new Chunk(workData.getContactPerson(), 
> fontData));
> 	cell.setBorderWidth(0);
> 	cell.setLeading(fLeading);
> 	table.addCell(cell);
> 	
> I need the 'Contact Person' row to be always in a fresh row. 
> What happens
> here is, if the 'Position:' is not displayed, am unable to display the
> 'Contact Person' in a new row. Are there any bug's in this or 
> any new ways
> to maintain?
> We'll be grateful to you for the suggestion, and we are a 
> long term users of
> iText and will continue to use this ultimate product!
> 
> 
> Also,
> Can I join your development team?
> 
> Thanks
> 
> Regards,
> 
> Krishna Prasad V
> XTDE.Com Private Limited
> Bangalore
> Ph: +91-(0)-9886320543
> 
> -----Original Message-----
> From: Paulo Soares [mailto:psoares (at) consiste.pt] 
> Sent: Wednesday, February 08, 2006 4:31 PM
> To: Krishna Prasad V; itext-questions (at) lists.sourceforge.net
> Subject: RE: [iText-questions] New Line for a table
> 
> "\n" 
> 
> > -----Original Message-----
> > From: itext-questions-admin (at) lists.sourceforge.net 
> > [mailto:itext-questions-admin (at) lists.sourceforge.net] On 
> > Behalf Of Krishna Prasad V
> > Sent: Wednesday, February 08, 2006 10:55 AM
> > To: itext-questions (at) lists.sourceforge.net
> > Subject: [iText-questions] New Line for a table
> > 
> > Sir, 
> > 
> > Do you have any method to to give a new line in a tabvle?
> > If so, Please guide me how to give a new blank line(s)?
> > 
> > -- 
> > Thanks & Regards
> > Krishna Prasad V
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
> > 
> 
> 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
iText-questions mailing list
iText-questions (at) lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions