Solved

select an item in a tree view control

Posted on 2004-04-22
3
260 Views
Last Modified: 2013-12-26
Hi!!
Supposing the next tree
A
└--B
    └--C
    └--D
└--E
    └--F
        └--G
└--H
    └--I

Every item in the tree is associated with a number saved in data in the moment to create every item. In this example:
A has associated 1 in data
B - 2
C - 3
   .
   .
   .
I - 9

How to make than giving the number of the data of an item to expand all the tree, because the tree is all collapsed, and then select and highlight the item with the given number?

For your help, thank you very much!!
0
Comment
Question by:tsirakua
  • 2
3 Comments
 

Author Comment

by:tsirakua
ID: 10894879
I think the tree is not good viewed for the special characters.
Here is again:
A
   B
      C
      D
   E
      F
         G
   H
      I
 
 I hope you understand, thank you
0
 
LVL 2

Accepted Solution

by:
bluecomet earned 250 total points
ID: 11049540
To expand all the treeview:

long ll_tvi

ll_tvi = tv.FindItem(RootTreeItem! , 0)

tv.ExpandAll(ll_tvi)

or

you must search the item which you will expand when give a number,

search the item (must search through all the tv), save the handle of the found item (use finditem) and then expand the item (tv.expand(handle))
0
 

Author Comment

by:tsirakua
ID: 11937580
I didn't probe it but thanks for your interest
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question