Numbered List
Hello,
I'm evaluating DocIO and I have the following problem:
I will have a numbered list which looks like:
1 Header1
1.1 Header2
1.1.1 Header3
Standardtext ......
All numbers should beginn on left without indents and only 1 space between the numbers and the Headertext. And this numbering should be right for use in a Table of Content to a level of 3.
When I use paragraph.ListFormat.ApplyDefNumberedStyle() I get something like:
1 Header1
a. Header2
Standardtext ......
I've tried to make a new ParagraphStyle, but I can't remove the spaces between
1 Header1
and so on. How can I define a numbered liststyle which looks like my wanted style?
Thanks for any help.
Hans
I'm evaluating DocIO and I have the following problem:
I will have a numbered list which looks like:
1 Header1
1.1 Header2
1.1.1 Header3
Standardtext ......
All numbers should beginn on left without indents and only 1 space between the numbers and the Headertext. And this numbering should be right for use in a Table of Content to a level of 3.
When I use paragraph.ListFormat.ApplyDefNumberedStyle() I get something like:
1 Header1
a. Header2
Standardtext ......
I've tried to make a new ParagraphStyle, but I can't remove the spaces between
1 Header1
and so on. How can I define a numbered liststyle which looks like my wanted style?
Thanks for any help.
Hans
SIGN IN To post a reply.
6 Replies
BP
Bhuvaneswari P
Syncfusion Team
August 7, 2008 12:06 PM UTC
Hi Hans,
Thanks for evaluating Syncfusion products.
Yes, it is possible to create a number list like you given by using the FollowCharacter and TabSpaceAfter property of the Listlevel object. Please refer the below code snippet to do so:
[VB]
Here is the sample which illustrates the above said feature:
http://websamples.syncfusion.com/samples/DocIO.Windows/P48637_1/main.htm
Please try this sample and let us know if this helps you.
Best Regards,
Bhuvana
Thanks for evaluating Syncfusion products.
Yes, it is possible to create a number list like you given by using the FollowCharacter and TabSpaceAfter property of the Listlevel object. Please refer the below code snippet to do so:
[VB]
Dim styleN As ListStyle = doc.AddListStyle(ListType.Numbered, "ListStyleN")
Dim listLevelL0 As WListLevel = styleN.Levels(0)
//Specify the type either Tab or Space
listLevelL0.FollowCharacter = FollowCharacterType.Space
listLevelL0.TabSpaceAfter = 1
Here is the sample which illustrates the above said feature:
http://websamples.syncfusion.com/samples/DocIO.Windows/P48637_1/main.htm
Please try this sample and let us know if this helps you.
Best Regards,
Bhuvana
HP
Hans Preuer
August 7, 2008 03:04 PM UTC
Hi Bhuvana,
Thanks, now this works.
Hans
Thanks, now this works.
Hans
BP
Bhuvaneswari P
Syncfusion Team
August 11, 2008 12:37 PM UTC
Hi Hans,
Thanks for the update.
Regards,
Bhuvana
Thanks for the update.
Regards,
Bhuvana
BM
Boris Mouzo Izquierdo
May 5, 2010 02:43 PM UTC
Hi,
I have a similar problem as the one who started this post but left unanswered. I'm generating a Word document with a numbered list. Let's say I need the following list:
1. Header1
1.1. Header1_1
1.1.1. Header1_1_1
1.1.2. Header1_1_2
1.2. Header1_2
As for now I've managed to get this:
1. Header1
1. Header1_1
1. Header1_1_1
2. Header1_1_2
2. Header1_2
What do I need to add or change to show on the indented headers the numbering of the parent header?
Thanks in advance
I have a similar problem as the one who started this post but left unanswered. I'm generating a Word document with a numbered list. Let's say I need the following list:
1. Header1
1.1. Header1_1
1.1.1. Header1_1_1
1.1.2. Header1_1_2
1.2. Header1_2
As for now I've managed to get this:
1. Header1
1. Header1_1
1. Header1_1_1
2. Header1_1_2
2. Header1_2
What do I need to add or change to show on the indented headers the numbering of the parent header?
Thanks in advance
BM
Boris Mouzo Izquierdo
May 6, 2010 07:12 AM UTC
Problem solved. After looking around a lot and googling through different pages I found the answer. I'll leave the link in case someone else has the same problem (search for deep level numbering instead of numbered list):
http://www.syncfusion.com/support/kb/289/How-to-create-the-deep-level-numbering%28-11-121-122-etc%29-using-DocIO
C#
ListStyle styleN = document.AddListStyle(ListType.Numbered, "ListStyleN");
WListLevel listLevelL0 = styleN.Levels[0];
listLevelL0.CharacterFormat.FontSize = 16;
listLevelL0.CharacterFormat.Bold = true;
listLevelL0.CharacterFormat.Italic = true;
listLevelL0.ParagraphFormat.LeftIndent = 0;
listLevelL0.ParagraphFormat.FirstLineIndent = 20;
WListLevel listLevelL1 = styleN.Levels[1];
listLevelL1.IsLegalStyleNumbering = true;
//Numberprefix defines prefix before numbering.
//\x0000 - defines that numbering of the previous level will be inherited
listLevelL1.NumberPrefix = "\x0000.";
listLevelL1.ParagraphFormat.LeftIndent = 70;
listLevelL1.ParagraphFormat.FirstLineIndent = -10;
WListLevel listLevelL2 = styleN.Levels[2];
listLevelL2.IsLegalStyleNumbering = true;
//\x0000.\x0001. - inherirs numbering of level 0 and 1
listLevelL2.NumberPrefix = "\x0000.\x0001.";
listLevelL2.ParagraphFormat.LeftIndent = 130;
listLevelL2.ParagraphFormat.FirstLineIndent = -40;
VB
Dim styleN As ListStyle = document.AddListStyle(ListType.Numbered, "ListStyleN")
Dim listLevelL0 As WListLevel = styleN.Levels(0)
listLevelL0.CharacterFormat.FontSize = 16
listLevelL0.CharacterFormat.Bold = True
listLevelL0.CharacterFormat.Italic = True
listLevelL0.ParagraphFormat.LeftIndent = 0
listLevelL0.ParagraphFormat.FirstLineIndent = 20
Dim listLevelL1 As WListLevel = styleN.Levels(1)
listLevelL1.IsLegalStyleNumbering = True
''Numberprefix defines prefix before numbering.
''\x0000 - defines that numbering of the previous level will be inherited
listLevelL1.NumberPrefix = ChrW(&H0000).ToString() & "."
listLevelL1.ParagraphFormat.LeftIndent = 70
listLevelL1.ParagraphFormat.FirstLineIndent = -10
Dim listLevelL2 As WListLevel = styleN.Levels(2)
listLevelL2.IsLegalStyleNumbering = True
''\x0000.\x0001. - inherirs numbering of level 0 and 1
listLevelL2.NumberPrefix = ChrW(&H0000).ToString() & "." & ChrW(&H0001).ToString() & "."
listLevelL2.ParagraphFormat.LeftIndent = 130
listLevelL2.ParagraphFormat.FirstLineIndent = -40
http://www.syncfusion.com/support/kb/289/How-to-create-the-deep-level-numbering%28-11-121-122-etc%29-using-DocIO
C#
ListStyle styleN = document.AddListStyle(ListType.Numbered, "ListStyleN");
WListLevel listLevelL0 = styleN.Levels[0];
listLevelL0.CharacterFormat.FontSize = 16;
listLevelL0.CharacterFormat.Bold = true;
listLevelL0.CharacterFormat.Italic = true;
listLevelL0.ParagraphFormat.LeftIndent = 0;
listLevelL0.ParagraphFormat.FirstLineIndent = 20;
WListLevel listLevelL1 = styleN.Levels[1];
listLevelL1.IsLegalStyleNumbering = true;
//Numberprefix defines prefix before numbering.
//\x0000 - defines that numbering of the previous level will be inherited
listLevelL1.NumberPrefix = "\x0000.";
listLevelL1.ParagraphFormat.LeftIndent = 70;
listLevelL1.ParagraphFormat.FirstLineIndent = -10;
WListLevel listLevelL2 = styleN.Levels[2];
listLevelL2.IsLegalStyleNumbering = true;
//\x0000.\x0001. - inherirs numbering of level 0 and 1
listLevelL2.NumberPrefix = "\x0000.\x0001.";
listLevelL2.ParagraphFormat.LeftIndent = 130;
listLevelL2.ParagraphFormat.FirstLineIndent = -40;
VB
Dim styleN As ListStyle = document.AddListStyle(ListType.Numbered, "ListStyleN")
Dim listLevelL0 As WListLevel = styleN.Levels(0)
listLevelL0.CharacterFormat.FontSize = 16
listLevelL0.CharacterFormat.Bold = True
listLevelL0.CharacterFormat.Italic = True
listLevelL0.ParagraphFormat.LeftIndent = 0
listLevelL0.ParagraphFormat.FirstLineIndent = 20
Dim listLevelL1 As WListLevel = styleN.Levels(1)
listLevelL1.IsLegalStyleNumbering = True
''Numberprefix defines prefix before numbering.
''\x0000 - defines that numbering of the previous level will be inherited
listLevelL1.NumberPrefix = ChrW(&H0000).ToString() & "."
listLevelL1.ParagraphFormat.LeftIndent = 70
listLevelL1.ParagraphFormat.FirstLineIndent = -10
Dim listLevelL2 As WListLevel = styleN.Levels(2)
listLevelL2.IsLegalStyleNumbering = True
''\x0000.\x0001. - inherirs numbering of level 0 and 1
listLevelL2.NumberPrefix = ChrW(&H0000).ToString() & "." & ChrW(&H0001).ToString() & "."
listLevelL2.ParagraphFormat.LeftIndent = 130
listLevelL2.ParagraphFormat.FirstLineIndent = -40
PR
Poornima R
Syncfusion Team
May 10, 2010 12:07 PM UTC
Hi Boris,
Thank you for your update.
We are glad that you have found the solution by yourself.
Please let us know if you have any other further queries.
Regards,
Poornima
Thank you for your update.
We are glad that you have found the solution by yourself.
Please let us know if you have any other further queries.
Regards,
Poornima
SIGN IN To post a reply.
- 6 Replies
- 4 Participants
-
HP Hans Preuer
- Aug 6, 2008 03:31 PM UTC
- May 10, 2010 12:07 PM UTC