Skip to main content

Lists

Version: 6.0

Lists

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

The List can be categorized into two types.

  • Ordered List: An Ordered List is a list which arranges the Items with Numbers as the index. For different types of number formats see the NumberingStyle class.
  • Unordered List: An UnOrdered List is a list which arranges the Items with bullets as the index. For setting the different types of bullets see the UnOrderedListStyle Class.

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

  • OrderedSubList
  • UnOrderedSubList

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 an OrderedList in a document.

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 );
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 );