The control has a Focus method that can be used to set the focus to a
control.
David Wrighton
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Rick" <
[email protected]>
| References: <
[email protected]>
<
[email protected]>
| Subject: Re: TreeNode.EnsureVisible workaround?
| Date: Wed, 20 Aug 2003 16:51:18 -0500
| Lines: 31
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <
[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: 216-107-127-200.wan.networktel.net 216.107.127.200
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:31474
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Michael,
|
| "TreeView1.SelectedNode = SomeTreeeNode" should do the trick. It scrolls
| and opens up to that level and node for me.
|
| One thing that it does not do that I would like to ask this astute group
of
| developers is how do you set the TreeView control with focus so that the
| selected node is displayed with the highlighted coloring? Until I tap on
| the control I cannot tell *which* of the nodes is selected.
|
| Rick
|
|
| | > No. As I stated in my original post, "Programmatically selecting a node
| > has no effect on visibility
| > (scrolling)."
| >
| > That is to say that selecting a node by any of the several mechanisms
| > provided does not cause it to becomve visible (scrolled to).
| >
| > Any other thoughts?
| >
| > Michael
| >
| >
| >
| > Don't just participate in USENET...get rewarded for it!
|
|
|