Working with List Elements

List elements provide a bulleted list of elements. They are useful for organizing a series of simple, related items, such as a list of links. Also common is using a list as an outline, because the bullets from a list placed in another list are indented even further than the outer list. Any HtmlT_Element type, such as tables, images, or even other lists, can be placed in a list element.The usage for the list feature is very simple:

  1. Create and populate a list of type PrgT_List using the Prg package of APIs. Each item in the list must be an HtmlT_Element, the sub-type such as text or image doesn't matter, but having an object that is not an HtmlT_Element is invalid.
  2. Create the list element itself by calling Html_Element_List_Create(). Note that the list element is also an HtmlT_Element.
  3. Add the list of elements to the page using Html_Page_Element_Add().

The sample source for the HTML package contains two examples of using lists. See the Sample Program.