Hello!
I have a table that has columns much wider that it's necessary. Is there a way to reduce some of columns width (starting from index=3) so that a width on each of them is only enough to include a content w/o extra space?
Thanks!
Set table columns best fit
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Set table columns best fit
BestFit option is not implemented yet, sorry.
I can suggest assigning minimal BestWidth to columns, and include rvpaoNoWrap in Options of paragraph style used in this table.
I can suggest assigning minimal BestWidth to columns, and include rvpaoNoWrap in Options of paragraph style used in this table.
Re: Set table columns best fit
Including rvpaoNoWrap in Options for the table's ParaStyle will put the cell's content in one line, which may make column wider, right? I do not want it for all cells, for example, I don't want it at first three columns. Does it mean that I should set rvpaoNoWrap for the all cells that don't contain multiline content?
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Set table columns best fit
I think for this table it's enough to make no-wrap header cells
Re: Set table columns best fit
Table behaves strangely, columns get very wide.
I prepared a demo project that'll help you to see the table and what I'm trying to do. Could you look at it?
Just be sure that file Table.rvf is placed at the same path as Project1.exe. Run it (you'll see the table in initial state) and push the bSetColumnsWidth button
SRV_VERSION = 'v7.2.1';
RVE v16.3.1
I prepared a demo project that'll help you to see the table and what I'm trying to do. Could you look at it?
Just be sure that file Table.rvf is placed at the same path as Project1.exe. Run it (you'll see the table in initial state) and push the bSetColumnsWidth button
SRV_VERSION = 'v7.2.1';
RVE v16.3.1
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Set table columns best fit
Hello,
This table has a large table.BestWidth assigned.
You set minimal widths for cells in all columns starting from the 4th.
As a result, the table has the same large width as before, but the first 3 columns occupy maximal possible space, and the rest of columns occupy minimal possible space.
To see what happens, assign after loading RVF (so the table is displayed completely):
This table has a large table.BestWidth assigned.
You set minimal widths for cells in all columns starting from the 4th.
As a result, the table has the same large width as before, but the first 3 columns occupy maximal possible space, and the rest of columns occupy minimal possible space.
To see what happens, assign after loading RVF (so the table is displayed completely):
Code: Select all
SRVE.PageProperty.Orientation := poLandscape;
SRVE.PageProperty.PageFormat := srvfmA3;