| TREEGEN COMPONENT 4.01 |
| Item
Object Last modified: April 6,1999 © 2000 Advantys. All rights reserved. |
The ID property contains the ID of an item.
Syntax
.IDReturn Values
Returns a Long value which is the ID of the current item.Examples
<%
Set MyItem = MyTree(3)
Response.Write("ID=" & MyItem.ID)
%>
The ChildID property contains the child ID of an item.
Syntax
.ChildIDReturn Values
Returns a Long value which is the child ID of the current item.Examples
The following example checks wether the current item has a child and write its ID if it exists.
<%
Set MyItem = MyTree(3)
if MyItem.HasChild then
Response.Write("ChildID=" & MyItem.ChildID)
end if
%>
The SiblingID property contains the sibling ID of an item.
Syntax
.SiblingIDReturn Values
Returns a Long value which is the brother ID of the current item.Examples
The following example checks wether the current item has a brother and write its ID if it exists.
<%
Set MyItem = MyTree(3)
if MyItem.HasSibling then
Response.Write("SiblingID=" & MyItem.SiblingID)
end if
%>
The ParentID property contains the parent ID of an item.
Syntax
.ParentIDReturn Values
Returns a Long value which is the parent ID of the current item.Examples
The following example checks wether the current item has a parent and write its ID if it exists.
<%
Set MyItem = MyTree(3)
if MyItem.HasParent then
Response.Write("ParentID=" & MyItem.ParentID)
end if
%>
The Child property contains the child of the current item.
Syntax
set MyChild = MyItem.ChildReturn Values
Returns a Item object which is the child of the current item.Examples
<%
Set MyItem = MyTree(3)
if MyItem.HasChild then
set MyChild = MyItem.Child
end if
%>
The Sibling property contains the brother of the current item.
Syntax
set MyBrother = MyItem.SiblingReturn Values
Returns a Item object which is the brother of the current item.Examples
<%
Set MyItem = MyTree(3)
if MyItem.HasSibling then
set MySibling = MyItem.Sibling
end if
%>
The Link property contains the link of the current item.
Syntax
set MyLink = MyItem.LinkReturn Values
Returns a Link object which is the link of the current item.Examples
<%
Set MyItem = MyTree(3)
Set MyLink = MyItem.Link
Response.Write("href=" & MyLink.Href)
%>
The BackLink property contains the backlink of the current item.
Syntax
set MyLink = MyItem.BackLinkReturn Values
Returns a Link object which is the backlink of the current item.Examples
<%
Set MyItem = MyTree(3)
set MyLink = MyItem.BackLink
Response.Write("href=" & MyLink.Href)
%>
The LikeAFolder property checks whether the item looks like a folder.
Syntax
.LikeAFolderReturn Values
Returns a BOOLEAN value that indicates whether the item must look like a folder.Examples
<%
Set MyItem = MyTree(3)
if MyItem.LikeAFolder then
Response.Write("<IMG SRC='FOLDER.GIF'>")
else
Response.Write("<IMG SRC='ITEM.GIF'>")
end if
%>
The ItemDate property contains a string value.
Syntax
.ItemDateReturn Values
Returns a String object.Examples
<%
Set MyItem = MyTree(3)
Response.Write("MyDate=" & MyItem.ItemDate)
%>
The ShortCut property contains the shortcut (if it exists) of the item.
Syntax
.ShortCutReturn Values
Returns a String value.Examples
<%
set MyItem = MyTree(5)
response.write("ShortCut = " & MyItem.ShortCut)
%>
The Level property contains the level of the item.
Level equals to 0 for the root item.Syntax
.LevelReturn Values
Returns a Long value.Examples
<%
set MyItem = MyTree.RootItem
Response.Write("RootLevel = " & MyItem.Level)
%>
The IsChildLoaded perperty checks whether the current item child is loaded or not.
This function is usefull when you use the loaditems method with a limited deep. If the whole items is not loaded, a specific item may have a child which is not loaded.Syntax
.IsChildLoadedReturn values
Returns a Boolean value.Examples
<%
set MyItem = MyTree(5)
if MyItem.IsChildLoaded then
Response.Write(MyItem.Child.link.text & "<br>")
end if
%>
The HasChild method checks whether the item has a child.
Syntax
.HasChild()Return Values
Returns a BOOLEAN value that indicates whether the item has a child. The HasChild method returns false if there's no child for this item.Examples
The following example checks wether the current item has a child and writes its ID if it exists.
<%
Set MyItem = MyTree(3)
if MyItem.HasChild then
Response.Write("ChildID=" & MyItem.ChildID)
end if
%>
The HasSibling method checks whether the item has a brother.
Syntax
.HasSibling()Return Values
Returns a BOOLEAN value that indicates whether the item has a brother. The HasSibling method returns false if there's no bother for this item.Examples
The following example checks wether the current item has a brother and writes its ID if it exists.
<%
Set MyItem = MyTree(3)
if MyItem.HasSibling then
Response.Write("SiblingID=" & MyItem.SiblingID)
end if
%>
The HasParent method checks whether the item has a parent.
Syntax
.HasParent()Return Values
Returns a BOOLEAN value that indicates whether the item has a parent. The HasParent method returns false if there's no parent for this item.Examples
The following example checks wether the current item has a parent and writes its ID if it exists.
<%
Set MyItem = MyTree(3)
if MyItem.HasParent then
Response.Write("ParentID=" & MyItem.ParentID)
end if
%>
The AddChild function adds a child to the current item.
Syntax
set oNewItem = myTree.Items(24).AddChild()Return values
Returns a Item Object.Examples
<%
Dim MyTree
Set MyTree = Server.CreateObject("TreeGen.Tree")
Set oNewItem = MyTree.Items.AddChild()
%>
The AddSibling function adds a brother to the current item.
Syntax
set oNewItem = myTree.Items(24).AddSibling()Return values
Returns a Item Object.Examples
<%
Dim MyTree
Set MyTree = Server.CreateObject("TreeGen.Tree")
Set oNewItem = MyTree.Items.AddSibling()
%>
© 2000 Advantys. All rights reserved.