Hi all,
I want to give a fixed width to table column created in a RTF file.
I want to use only Table not RTFTable.
I tried givng width at cell level......but the table width specfied overrides the cell width.
Table Headtable = new Table(2,1);
Headtable.setBorderWidth(2);
Headtable.setPadding(9f);
// Headtable.setBorderColor(Color.gray);
Headtable.setBorderColo r(new Color(0xC0, 0xC0, 0xC0));
Headtable.setCellpadding(1);
Headtable.setCellspacing(1);
Headtable.setBorderWidth(2);
Headtable.setPadding(9f);
// Headtable.setBorderColor(Color.gray);
Headtable.setBorderColo r(new Color(0xC0, 0xC0, 0xC0));
Headtable.setCellpadding(1);
Headtable.setCellspacing(1);
Headtable.setAlignment(Element.ALIGN_LEFT);
// Headtable.setWidth(125);
Headtable.endHeaders();
Cell HeadCell;
// Headtable.setWidth(125);
Headtable.endHeaders();
Cell HeadCell;
HeadCell= new Cell(new Phrase("21",new Font(Font.HELVETICA, 12, Font.BOLD)));
HeadCell.setWidth("10");
HeadCell.setBorderColor(new Color(0xC0, 0xC0, 0xC0));
Headtable.addCell(HeadCell);
HeadCell.setWidth("10");
HeadCell.setBorderColor(new Color(0xC0, 0xC0, 0xC0));
Headtable.addCell(HeadCell);
Here i wanted first column to be 20% and last column be 80%......
Please let me know if u have a solution for this...
Thanks in advance,
Sujatha
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.
