Started by juniorolisp ·
2018-01-08 12:20 UTC ·
6 replies · SMF topic #2555
juniorolisp
2018-01-08 12:20 UTC
Hello. I would like to create an a list for a tree
When you click on "2018-01-23"
(Start XXXX XXXX 2018)
When you click on "XXXX"
(Start XXXX XXXX)
e.t.c.
How to do it
fred_tomke
2018-01-08 12:31 UTC
Hello, I have to say that I didn't quite understand your desire. You can get notified when the current selection was changed using
{2} event. Or you react on
{2}-event. Use the GetNextSiblingItem or the GetPrevSiblingItem method to get sibling nodes or GetParentItem to retreive the parent node.
Regards, Fred
fred_tomke
2018-01-08 12:33 UTC
Hi, in addition to my first answer and in relation to your topic name use GetFirstChildItem method to get the first child node of an item. Regards, Fred
juniorolisp
2018-01-08 12:43 UTC
Exactly the reverse of this function (GetFirstChildItem)
fred_tomke
2018-01-08 12:57 UTC
Hello, if you mean something like "GetLastChild" you have to iterate all nextsiblings of a level unless you're keeping a list of all nodes in a list or blackboard.
Regards, Fred
roy_043
2018-01-08 13:19 UTC
It think the OP wants a list representing a tree item's nesting level. Using the dcl-Tree-GetParentItem function it should be possible to create a custom function for this purpose.
juniorolisp
2018-01-22 10:10 UTC
Thank you for quick reply. everything works