#1 2018-03-09 17:18:47

realsofo
Member
Registered: 2018-02-21
Posts: 6

Wordwrap Column Header

Please help me with a solution for bellow subjects:

- I would like to wordwrap the text from table header. I've tried to split the text with #13#10 but it doens't work (this is the main issue from this thread)
- I would like to add some space between rows from table
- I would like to add some space after table header
- I would like to change the color of row line to black

       
       WordWrapLeftCols:= True;
       AddColumns([3,14,30,7,8,10,10,10]);

       SetColumnAlign(3,caRight);
       SetColumnAlign(4,caRight);
       SetColumnAlign(5,caRight);
       SetColumnAlign(6,caRight);
       SetColumnAlign(7,caRight);

       //SetColumnBold(7);

       AddColumnHeaders(['#',
         'Article',
         'Description',
         'Price',
         'Qty.',
         'Total price',
         'Discount',
         'Total price' + #13#10 + 'with discount'],True,True,0); //--> here I would like to wordwrap the "Total price with discount" text

       for i := 1 to 25 do
         begin
         DrawTextAcrossCols([IntToStr(i),
            '3344574',
            'Some description here, range 0-100 mm' + #13#10 + 'Delivery: 2-3 weeks',  //--> this works well
            '2.000 €',
            '1',
            '2.000 €',
            '10%',
            '1.800 €']);
         //DrawLine;
         end;

       TextAlign:= taRight;
       Font.Size:= 14;
       Font.Style:= [fsBold];
       DrawTextAt('TOTAL',RightMarginPos - 50);
       DrawTextAt('1.800 €',RightMarginPos);

Sample here

Offline

Board footer

Powered by FluxBB