Skip to main content

[archive] Simple Q. treeview..

  • June 19, 2008
  • 5 replies
  • 0 views

[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

5 replies

[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
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.

[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
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

[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
Sorry, I meant by hidden-info the hidden-data.

[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
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",

[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
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