Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Sun Jan 11, 2015 11:16 am

Dear support,

I need to add a paragraph with left, center, and right text.
I can add the paragraph and set some tabs with justification. (1", 2", 3", 4", 5", 6")
Paragraph para = section.AddParagraph();
para .Format.Tabs.AddTab(72).Justification = TabJustification.Left;
para .Format.Tabs.AddTab(144).Justification = TabJustification.Right;
para .Format.Tabs.AddTab(216).Justification = TabJustification.Left;
para .Format.Tabs.AddTab(288).Justification = TabJustification.Right;
para .Format.Tabs.AddTab(360).Justification = TabJustification.Left;
para .Format.Tabs.AddTab(432).Justification = TabJustification.Right

How to I add text to the desired tab.
Something like
para.Tabs[2].AppendText("a");

How else to do layout three text regions on the same line?
Do you have to use a table?

Seems like it should be a major feature.

Regards,
Bart

bart
 
Posts: 4
Joined: Mon Dec 22, 2014 9:00 pm

Mon Jan 12, 2015 6:16 am

Dear bart,

Thanks for your inquiry.

There is a solution which would meet your requirement: use "\t" to append text in tab position. For example:
Code: Select all
//...
paragraph.Format.Tabs.AddTab(72).Justification = TabJustification.Left;
paragraph.AppendText("\tHello"); //move to next tab and append text


And you mentioned that "How else to do layout three text regions on the same line? Do you have to use a table?" in your last post, sorry that I have no idea about this, can you give us some more detailed information?

Thank you.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Tue Jan 13, 2015 8:42 am

Hello bart,

Did you try the solution I provided? How is it going?

Looking forward to your response.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Wed Jan 14, 2015 6:17 am

Burning,

With your help managed to figure out how to do the tabs.
Thank you.

Still wondering about my other post, the ability to have two TOCs based on custome styles.

Bart

bart
 
Posts: 4
Joined: Mon Dec 22, 2014 9:00 pm

Wed Jan 14, 2015 6:35 am

Dear bart,

Glad to hear that the problem has been resolved.

About TOC problem you posted before, I got news from our dev team that they have fixed this problem and the new version of Spire.Doc is under testing, we will inform you when the new version of Spire.Doc is available.

Thank you.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.Doc