How to find parent node of selected item in a tree

How to find parent node of selected item in a tree

Postby cgelago » Wed Jan 04, 2017 6:57 pm

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.
cgelago
 
Posts: 15
Joined: Thu Mar 26, 2015 5:18 pm

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

Postby Mahmoud Fayed » Thu Jul 06, 2017 5:30 pm

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
Mahmoud Fayed
Site Admin
 
Posts: 642
Joined: Tue Apr 23, 2013 4:50 am


Return to Questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron