Highlighted
Absent Member.
Absent Member.
358 views

[archive] Simple Q. treeview..

[Migrated content. Thread originally posted on 19 June 2008]

Hello,

I didn't use the treeview control before, and I do need it now.
I created a treeview and made expanded when the program starts.
My question is:
When the user clicks on any item in the tree, I need to know what item did he clicked?

Can anyone help please!!

Thanks
0 Likes
5 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Simple Q. treeview..

One of the values of an item in a tree is hidden-data. If you put a unique value in the hidden-data (when loading or adding to the tree you can then inquire the tree

inquire tree (event-data-2)
hidden-data in hidden-info

hidden-info could be a unique data item which would allow you to read a file or designate the item in the tree.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Simple Q. treeview..

Hello again,

Thanks for your post, I don't fill the tree from the program, the tree is filled on the screen itself, I mean I've a fixed items which will never change.
So, I don't move any data to the hidden-info.

Any tips how I can get the name of the item the user clicked on?

Regards
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Simple Q. treeview..

Sorry, I meant by hidden-info the hidden-data.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Simple Q. treeview..

When you load the tree try loading it similar to this:

MODIFY tree,
ITEM-TO-ADD = "first", GIVING Form1-Tr-1-TI-1-IdPtr,
HIDDEN-DATA = "first",
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Simple Q. treeview..

Thanks again, I managed to do it in the control itself.
Just modified the prop. of each item in the tree and type the same name of the tree-item in the hidden-data field, and it's ok.

thanks again
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.