This commit is contained in:
hyatt%netscape.com 2000-08-16 23:41:32 +00:00
Родитель d854d084a2
Коммит 36d75d26c9
2 изменённых файлов: 9 добавлений и 14 удалений

Просмотреть файл

@ -120,27 +120,17 @@ function AppendStringToTreelist(tree, string)
{
if (tree)
{
var treechildren = tree.firstChild;
if (!treechildren)
{
treechildren = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "treechildren");
if (treechildren)
tree.appendChild(treechildren);
else
{
dump("Failed to create <treechildren>\n");
return null;
}
}
var treechildren = document.getElementById('child');
var treeitem = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "treeitem");
var treerow = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "treerow");
var treecell = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "treecell");
if (treeitem && treerow && treecell)
{
treecell.setAttribute("value", string);
treerow.appendChild(treecell);
treeitem.appendChild(treerow);
treechildren.appendChild(treeitem)
treecell.setAttribute("value", string);
var len = Number(tree.getAttribute("length"));
if (!len) len = -1;
tree.setAttribute("length",len+1);

Просмотреть файл

@ -36,7 +36,12 @@ Contributor(s): ______________________________________. -->
<box align="vertical" style="width: 24em;margin: 5px;">
<text id="info.txt" class="label"/>
<box orient="vertical">
<tree rows="4" class="list" id="list" flex="1"/>
<tree rows="4" class="list" id="list" flex="1">
<treecolgroup>
<treecol flex="1"/>
</treecolgroup>
<treechildren flex="1" id="child"/>
</tree>
</box>
</box>
<box id="okCancelButtons"/>