I would like to design a table which shows a thin border around each cell, but does not print it. Is that possible ?
tIA
Didier
I would like to design a table which shows a thin border around each cell, but does not print it. Is that possible ?
tIA
Didier
I have found it for myself. before printing, I am removing the table borders.
In case this helps someone, you just have to remember that all tables are attached to the firstpar of the document. then you simply loop through the Tables array, get the firstlevelPar of the table and proceed through all paragraphes using next. YOu will be out of the table as soon as the parentparagraph type is not in wpistable or wpistablerow
var i: integer;
table: tParagraph;
tblrow : tParagraph;
ParentParagraph : tParagraph;
j: Integer;
begin
for i := 0 to pred( document.firstpar.TableCount) do
begin
table := document.firstpar.Tables[i];
for j := 0 to table.RowCount - 1 do
begin
tblrow := table.Rows[j].FirstLevelPar;
while tblrow <> nil do
begin
ParentParagraph := tblrow.ParentPar;
if (ParentParagraph <> nil) and
(ParentParagraph.ParagraphType in [wpIsTable, wpIsTableRow]) then
begin
if (showit) then
tblrow.ASet(WPAT_BorderFlags, WPBRD_DRAW_All4)
else
tblrow.ASet(WPAT_BorderFlags, 0) ;
end;
tblRow := tblrow.next;
end;
end;
end;
document.DelayedReformat;
end;
Alles anzeigen
Didier