List Class | OrderedList Class | UnorderedList Class | OrderedSubList Class | UnorderedSubList Class | Page Elements | Programming with Generator for .NET

Language

Visual Basic

C#

Show All

List is a page element which contains collection of Items arranged in a sequential order.

The List can be categorized into two types.

Custom bullets can also be created by using the UnorderedListStyle class. Under ListItems SubLists is an option. SubLists are two types.

Set the properties of the List either in the Main List level or subList Level or ListItem Level. If the Listed Items in the List goes beyond the given height of the List it is called Overflow. Using the OrderedList/UnorderedList GetOverflow methods to flow the List onto other pages.

The following example shows how to create Ordered List in a Document.

[Visual Basic]
Dim MyList As OrderedList = New OrderedList( 50, 120, 300, 500 )
MyList.ListItemTopMargin = 5
MyList.ListItemBottomMargin = 5
MyList.BulletPrefix = "("
MyList.BulletSuffix = ")"
Dim item1 As ListItem = MyList.Items.Add( ".NET products" )
item1.Underline = true
Dim item2 As ListItem = MyList.Items.Add( "JAVA products" )
item2.Underline = true
Dim subList1 As OrderedSubList = item1.SubLists.AddOrderedSubList( NumberingStyle.RomanUpperCase )
Dim item3 As ListItem = subList1.Items.Add( "DynamicPDF™ Generator for .NET" )
Dim item4 As ListItem = subList1.Items.Add( "DynamicPDF™ Merger for .NET" )
Dim subList2 As OrderedSubList = item2.SubLists.AddOrderedSubList( NumberingStyle.RomanUpperCase )
Dim item5 As ListItem = subList2.Items.Add( "DynamicPDF™ Generator for JAVA" )
Dim item6 As ListItem = subList2.Items.Add( "DynamicPDF™ Merger for JAVA" )
Dim subList3 As OrderedSubList = item3.SubLists.AddOrderedSubList( NumberingStyle.AlphabeticLowerCase )
Dim item7 As ListItem = subList3.Items.Add( "Community Edition" )
Dim item8 As ListItem = subList3.Items.Add( "Professional Edition" )
Dim item9 As ListItem = subList3.Items.Add( "Enterprise Edition" )
MyPage.Elements.Add( MyList );
[C#]
OrderedList list = new OrderedList( 50, 120, 300, 500 );
list.ListItemTopMargin = 5;
list.ListItemBottomMargin = 5;
list.BulletPrefix = "(";
list.BulletSuffix = ")";
ListItem item1  = list.Items.Add( ".NET products" );
item1.Underline = true;
ListItem item2  = list.Items.Add( "JAVA products" );
item2.Underline = true;
OrderedSubList subList1 = item1.SubLists.AddOrderedSubList( NumberingStyle.RomanUpperCase );
ListItem item3 = subList1.Items.Add( "DynamicPDF™ Generator for .NET" );
ListItem item4 = subList1.Items.Add( "DynamicPDF™ Merger for .NET" );
OrderedSubList subList2 = item2.SubLists.AddOrderedSubList( NumberingStyle.RomanUpperCase );
ListItem item5 = subList2.Items.Add( "DynamicPDF™ Generator for JAVA" );
ListItem item6 = subList2.Items.Add( "DynamicPDF™ Merger for JAVA" );
OrderedSubList subList3 = item3.SubLists.AddOrderedSubList( NumberingStyle.AlphabeticLowerCase );
ListItem item7 = subList3.Items.Add( "Community Edition" );
ListItem item8 = subList3.Items.Add( "Professional Edition" );
ListItem item9 = subList3.Items.Add( "Enterprise Edition" );
page.Elements.Add( list );

See Also 

List Class | OrderedList Class | UnorderedList Class | OrderedSubList Class | UnorderedSubList Class | Page Elements | Programming with Generator for .NET