Page 1 of 1

How to find parent node of selected item in a tree

PostPosted: Wed Jan 04, 2017 6:57 pm
by cgelago
Hello.
I want to get the parent node in the selected item in a tree.

The command
"nTreeParent := winMenuCreate.treeMenuProgram.Parent"
returns error in compile time
"c:\custwork\coop\src\menucreate.PRG(395) Error E0030 Syntax error "syntax error at '.'"

How is this working ?
Thank you.

Re: How to find parent node of selected item in a tree

PostPosted: Thu Jul 06, 2017 5:30 pm
by Mahmoud Fayed
Hello

I want to get the parent node in the selected item in a tree.


(1) The HMG Extended Library used in HarbourPWCT doesn't support getting the parent node directly
The parent property/attribute is related to the Control Parent (Window), not the Parent node

(2) Create a List to store the Tree data (Node ID, Parent ID, Value) then use this list for node processing

(3) Check the next samples

* https://sourceforge.net/projects/double ... p/download

* https://sourceforge.net/projects/double ... p/download

* https://sourceforge.net/projects/double ... p/download

(4) In PWCT 2.0 we are using the Ring programming language (http://ring-lang.net) and the Qt GUI Framework which contains huge number of classes and more features for easy development.

Greetings,
Mahmoud