473,394 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Programaticly shift the fucus from treeview to child form

Hi,

I have a MDI container that contains a treeview and a
child form. Clicking on a tree node will open the child
form. Right now, the focus stays with the treeview, even
after the child form is loaded. When I want, however, is
that after a tree node is clicked, and a child form is
loaded, the focus should be shifted to the child form. How
to do that? I tried in the MDI container form to set focus
but it doesn't seem to work.

Please help!

Thanks
Nov 20 '05 #1
3 1414
* "feng" <an*******@discussions.microsoft.com> scripsit:
I have a MDI container that contains a treeview and a
child form. Clicking on a tree node will open the child
form. Right now, the focus stays with the treeview, even
after the child form is loaded. When I want, however, is
that after a tree node is clicked, and a child form is
loaded, the focus should be shifted to the child form. How
to do that? I tried in the MDI container form to set focus
but it doesn't seem to work.


Did you try to call the child form's 'Activate' method?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
I just tried that. It doesn't seem to make any
difference...
-----Original Message-----
* "feng" <an*******@discussions.microsoft.com> scripsit:
I have a MDI container that contains a treeview and a
child form. Clicking on a tree node will open the child
form. Right now, the focus stays with the treeview, even after the child form is loaded. When I want, however, is that after a tree node is clicked, and a child form is
loaded, the focus should be shifted to the child form. How to do that? I tried in the MDI container form to set focus but it doesn't seem to work.


Did you try to call the child form's 'Activate' method?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
.

Nov 20 '05 #3
* "feng" <an*******@discussions.microsoft.com> scripsit:
I just tried that. It doesn't seem to make any
difference...


Mhm...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Steve | last post by:
Visual Studio 2003 .NET / C# I have a treeview object on a form which acts as the main menu controller for my application. the treeview is always in sight, and the form it is on acts as the...
1
by: Terry | last post by:
I've seen several posts from people who have seen this flashing in TreeView's when resizing a form. I've noticed it in my app, but only in the child windows. For example, my main form has a...
13
by: André Nogueira | last post by:
Hi there. I know you can view a node's fullpath property, but is it posible to select a node using its path? Like, tell the treeview that the node that should be selected is the node with the...
2
by: pc1 | last post by:
Dear Sir, I am a student of MCA .Now I am working in VisualStudio 2005 Beta 2.0. I have taken two textbox and one Combobox in a form and the combobox is placed in between textbox.When I run...
6
by: xla76 | last post by:
I have a simple treeview (treeview1) to which I have added two nodes (nodeA and nodeB) which have n levels of child nodes. What I want is to be able to identify whether the child node I select...
1
by: JRSofty | last post by:
Hi everyone, I've gotten myself is bit of a mess where I'm loading a treeview. Basically I initialize the treeview control with a single root node we'll call it root. I do this by using the...
7
by: Joe Cool | last post by:
Let's say I have a Treeview control on a form. Each leaf node in the Treeview has a ContextMenuStrip, each with one ToolStripMenuItem, and all ToolStripMenuItems Click event is handled by a comment...
0
by: Dennis Francek | last post by:
Hello I have populated a treeview from my dataset and by clicking in the treeview i want to get the corresponding table shown in a datagridview. Ive managed this by looking at each DataRow and...
2
by: Maddy | last post by:
I need to populate a treeview from a text file. The data in it is in the following form 1. (Parent Node) (a) (Child Node) (b) (Child Node) .. .. .. (k) (Child Node)
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.