Is there any reason
why adding a List to a ListItem (as a sublist of the list) using ListItem.add()
doesn't work like adding a List to a List using List.add()? There seems to be
code to add a List to a ListItem, but the sublist never displays the symbol and
doesn't get indented correctly. I would like to be able to do something similar
to this list in HTML:
<ul>
<li>Parent Item 1</li>
<li>Sub Parent
<ul>
<li>sub list</li>
<li>sub list 2</li>
</ul>
</li>
<li>Parent item 2</li>
</ul>
<li>Parent Item 1</li>
<li>Sub Parent
<ul>
<li>sub list</li>
<li>sub list 2</li>
</ul>
</li>
<li>Parent item 2</li>
</ul>
[C#] -- this won't
render the sublist correctly
List l = new List(false, false,
10f);
l.SetListSymbol("\u2022");
l.Add(new ListItem("Parent Item 1"));
l.SetListSymbol("\u2022");
l.Add(new ListItem("Parent Item 1"));
ListItem li = new ListItem("Sub
Parent");
List s = new List(false, false,
10f);
s.SetListSymbol("-");
s.Add(new ListItem("sub 1"));
s.Add(new ListItem("sub 2"));
s.SetListSymbol("-");
s.Add(new ListItem("sub 1"));
s.Add(new ListItem("sub 2"));
li.Add(s);
l.Add(li);
l.Add(li);
l.Add(new ListItem("Parent Item
2"));
Thanks,
Mitch
Freed