Programaticly shift the fucus from treeview to child form

  • Thread starter Thread starter feng
  • Start date Start date
F

feng

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
 
* "feng said:
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?
 
Back
Top