#1 2016-08-09 05:43:18

serdor
Member
Registered: 2016-08-08
Posts: 3

Create multi-line headers in tables

Hi,

I am discovering PDF Engine library. In my project, I need to create the tables and export them to PDF. I am using the TestSQLite3Pages as a base.  Everything looks fine except of one: I cannot make text wrapping for headers and in cells.
I tried to   use two lines of code, one by one:

AddColumnHeaders(['#','Second column,Third colunm], false,true, -1, 0);
AddColumnHeaders(['',is here,is here', true, true, 0,0);

But in there is a line between first and second lines. (Although I set the WithBottomGrayLine  parameter of the fist function to FALSE).

And I don't know how to do the text wrapping in the cells.

Please help.

Thanks in advance.

Offline

#2 2016-08-15 05:25:31

serdor
Member
Registered: 2016-08-08
Posts: 3

Re: Create multi-line headers in tables

I finally found that setting WordWrapLeftCols := true     allows me to auto wrap text in the cells of table. But the text in headers remained unchanged (wrapping not worked).
In the unit SQLite3Pages  I've found the following comment from developer:
  Version 1.15
...
  - if TGDIPages.WordWrapLeftCols=TRUE, won't wrap column headers


So I searched for the procedure where the headers are processing. This is it:
procedure TGDIPages.PrintColumnHeaders;

In this function, there is a line
WordWrapLeftCols := false;

So developer has disabled the word wrapping in headers for some case.  Of course, I have commented this line of code. And...  word wrapping in headers works fine. At least I haven't found any bugs with it yet.

So my question for developer:   why did you disabled word wrapping in headers, and can I re-enable it? Will I get some possible errors in the future?
Thanks!

Offline

Board footer

Powered by FluxBB