Home > database >  How to retrieve a treeview on one node, and expand.
How to retrieve a treeview on one node, and expand.

Time:09-27

If you have the same node, can continue to query,

CodePudding user response:

Treeviewname. The GetItem (itemhandle, item)
Treeviewname. FindItem (navigationcode itemhandle)

Using these two functions over lixia, if you can also use the DATASTORE with DATASTORE to cooperate to create the TreeView to help search,

CodePudding user response:

What is the same node?
TreeViewItem objects of the same label, or?

Each additem () a node, will return a handle is a long data.
When clicked a node, also can get get the handle and can make the node with the getitem method treeviewitem object and obtain relevant data.

CodePudding user response:

I don't know speak too!
Click or double-click the event, there is parameter handle
Use the getitem method can remove that item!


If you have the same node, can continue to query,

It has to do with your design!

CodePudding user response:

Specific point is, there is a tree next to set up a text box, two buttons (1, find, 2. Continue to lookup), find the position of the contents of a text box in the tree, found after do identification, and expand,

CodePudding user response:

reference 4 floor l_chlmh response:
specific point is, there is a tree next to set up a text box, two buttons (1, find, 2. Continue to lookup), find the position of the contents of a text box in the tree, found after do identification, and expand,


A, you is the content of the text box of direct text or something?
Second, what do you mean by referring to the same node, what is the relationship between text box and described above?
Three, or related to your design, all the treeview node has a label with the data attribute, the label to show the value of the data for the data value, and its parent node, so actually looks like the same nodes in the tree is unique, to see your design ~ ~

Your demand is in your own mind, not express it ~ ~

CodePudding user response:

Is to check the label of the displayed value,

CodePudding user response:

Can continue to do with Finditem returns a handle to the node parameter.

CodePudding user response:

Just see, immediately back to try,

CodePudding user response:

The algorithm of traversing
 function TreeList (long handle) 
Long ll_Handle
Treeviewitem ltvi_Item
Ll_Handle=Tv_Tree. Finditem (ChildTreeItem! , handle)
The do while ll_Handle & lt;> 1
Tv_Tree. The Getitem (ltvi_Item ll_Handle)
//corresponding operation according to ltvi_Item do
Ltvi_Item namely remove node,
Ltvi_Item. Statepictureindex node status, generally used to distinguish the checkbox
Ltvi_Item. Title label node
Ltvi_Item. Data node is created to store data
TreeList (ll_Handle)
Ll_Handle=Tv_Tree. Finditem (NextTreeItem! , handle)
Loop
Call TreeList (0) to complete the whole tree traversal

CodePudding user response:

In add to the judgment of the conditions you can find the node you want,

CodePudding user response:

A node with what east east

CodePudding user response:

Judge ltvi_Item. Expanded=true
  • Related