Page 1 of 1

Getting control of margins in cells

Posted: Mon May 29, 2006 1:15 pm
by tobiasthorn
Summary:
Want to: Add many tablecells on a page
Problem: Due to unexpected margins the cells get wider then wished and hence less cells fit on one page.

I set some properties for the table:
table.BorderHSpacing := -1;
table.BorderVSpacing := -1;
table.CellHSpacing := -1;
table.CellVSpacing := -1;

I allso create a new ParaStyle that I use when I add text. This I do like:
table.Cells[1, c].AddNL(colCaption, 1, 9);

There are many columns. And I set the cell of each cell, e.g.
table.Cells[r, c].BestWidth := -2; //If it is 50 cells on a page
-2 means 2% right?
I want to fit as many as possible on a landscape page.

PROBLEM:
But there is a margin added to the cell as soon as I add a text to the cell. I suspect it come from the ParaStyle but I am not sure since I have made a new ParaStyle that I use and all margins in that style is set to 0 (by default);

Any ideas on where this margin come from and how to avoid it?

addition to margins in tablecells

Posted: Tue May 30, 2006 8:55 am
by tobiasthorn
I figured maybe there is some end of string chars or newline chars at the end of the string. So I tried:
RV.Style.ParaStyles.Items[9].Alignment := rvaRight;

But the text (a colnumber) simple aligned nice and sweet to the right so then the unwanted space bubbled over to the left of the text.
I.e. the space is still there!

Posted: Tue May 30, 2006 12:53 pm
by Sergey Tkachenko
Please send me an example as RVF file