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:
- Create and populate a list of type
PrgT_Listusing the Prg package of APIs. Each item in the list must be anHtmlT_Element, the sub-type such as text or image doesn't matter, but having an object that is not anHtmlT_Elementis invalid. - Create the list element itself by calling
Html_Element_List_Create(). Note that the list element is also anHtmlT_Element. - 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.