PDFsharp & MigraDoc Forum

PDFsharp - A .NET library for processing PDF & MigraDoc - Creating documents on the fly
It is currently Wed Dec 17, 2025 2:48 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules

Also see our new Tailored Support & Services site.



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Oct 29, 2012 10:41 pm 
Offline

Joined: Mon Oct 29, 2012 10:34 pm
Posts: 4
Hi,

I have created a table that has 3 column headings.
I can underline the word of each heading but I would like to extend the underline to the width of each column so that it looks like a solid line from the first column to the last.

Such as below
Col 1 Col 2 Col 3

Currently it displays like this:

Col 1 Col 2 Col 3

This is the code that creates the display above:

Row rowTable1 = table1.AddRow();
rowTable1.Cells[0].AddParagraph("Field No.");
rowTable1.Cells[1].AddParagraph("Field Name");
rowTable1.Cells[2].AddParagraph("Contents");
rowTable1.Format.Font.Underline = Underline.Single;

Thanks,
Gloria


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 30, 2012 10:56 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3139
Location: Cologne, Germany
Hi, Gloria,

You can have frames around cells, rows, columns.

Just a wild guess: maybe you should use a header row with a bottom border instead of underlined text.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 30, 2012 12:24 pm 
Offline

Joined: Mon Oct 29, 2012 10:34 pm
Posts: 4
Thanks for the quick reply...I will try the Header Row.

Next question, how do you create a Header Row? I have viewed the samples and help files but don't see how to do it.
OK...I figured this out.
In case someone else needs to know, I did it this way...

rowTable1.HeadingFormat = true;
rowTable1.Format.Borders.Bottom = rowBorder;
rowTable1.Cells[0].AddParagraph("Field No.");
rowTable1.Cells[1].AddParagraph("Field Name");
rowTable1.Cells[2].AddParagraph("Contents");

Thanks,

Gloria


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 348 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group