Solved

search text string in a textbox to find child-node in Treeview  VB.NET 2003

Posted on 2007-03-31
3
318 Views
Last Modified: 2010-04-23
Hi Experts,

I wonder if you can help. I want to build a winForm with a Textbox and a Treeview control. If I type in "keyword" into the textbox and click "Find" button, then it will automatically collapse selected root-node and find the "keyword" child-node.

Is this possible? As I've searched for a solution and am a little lost...

Regards,
Roberto
0
Comment
Question by:RobertoFreemano
3 Comments
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 125 total points
ID: 18828761
You need to loop through the Treeview (see "Select/Unselect all features" from http://www.emoreau.com/Entries/Articles/2006/04/The-Treeview-control.aspx) and when you find your node, you can use YourReferenceToYourFoundNode.EnsureVisible
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

757 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

22 Experts available now in Live!

Get 1:1 Help Now