Solved

select an item in a tree view control

Posted on 2004-04-22
3
255 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
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.

762 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now