Author Topic: Tree - getchield  (Read 488 times)

juniorolisp

  • Member
  • *
  • Posts: 19
Tree - getchield
« on: January 08, 2018, 04:20:11 AM »
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

  • OpenDCL Technician
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2024
  • [ Mr. Bad Guy ]
    • Kommunale Entwicklungsplanung auf digitaler Basis - digital landscape and urban design
Re: Tree - getchield
« Reply #1 on: January 08, 2018, 04:31:24 AM »
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

  • OpenDCL Technician
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2024
  • [ Mr. Bad Guy ]
    • Kommunale Entwicklungsplanung auf digitaler Basis - digital landscape and urban design
Re: Tree - getchield
« Reply #2 on: January 08, 2018, 04:33:06 AM »
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

  • Member
  • *
  • Posts: 19
Re: Tree - getchield
« Reply #3 on: January 08, 2018, 04:43:25 AM »
Exactly the reverse of this function (GetFirstChildItem)

Fred Tomke

  • OpenDCL Technician
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2024
  • [ Mr. Bad Guy ]
    • Kommunale Entwicklungsplanung auf digitaler Basis - digital landscape and urban design
Re: Tree - getchield
« Reply #4 on: January 08, 2018, 04:57:27 AM »
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

  • Sr. Member
  • ****
  • Posts: 338
Re: Tree - getchield
« Reply #5 on: January 08, 2018, 05:19:55 AM »
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

  • Member
  • *
  • Posts: 19
Re: Tree - getchield
« Reply #6 on: January 22, 2018, 02:10:10 AM »
Thank you for quick reply. everything works