Tree - getchield

Started by juniorolisp, January 08, 2018, 04:20:11 AM

Previous topic - Next topic

juniorolisp

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

Hello, I have to say that I didn't quite understand your desire. You can get notified when the current selection was changed using OnSelChanged event. Or you react on OnClicked-event. Use the GetNextSiblingItem or the GetPrevSiblingItem method to get sibling nodes or GetParentItem to retreive the parent node.
Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Fred Tomke

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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

juniorolisp

Exactly the reverse of this function (GetFirstChildItem)

Fred Tomke

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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

roy_043

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

Thank you for quick reply. everything works