469,889 Members | 1,110 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,889 developers. It's quick & easy.

Form Input Focus

Ok here's my situation...

Got an MDI application with a panel to my right that has a tree view
for the project stuff, etc.

Now if I select an item in the tree view, the tree view gains input
focus. After this happens, my MDI children no longer are able to
obtain keyboard focus and therefore no longer receive keyboard
commands. Needless to say, that's a bad thing. :)

I've tried overriding OnClick() and adding a call to this.Focus(), but
no luck....

So what do I do?? The MDI windows themselves contain no controls as
the views are rendered directly onto the form using DirectX.

Any help is greatly appreciated,

Stephan
Nov 15 '05 #1
2 3820
So, if you click in the TreeView, you want to set the focus back to the
MDI window, is that what you want? If so, try setting the focus to the
MDI window in the MouseUp event handler of the TreeView. If that isn't
your problem, can you determine what form/control has focus?

Stephan Rose wrote:
Ok here's my situation...

Got an MDI application with a panel to my right that has a tree view
for the project stuff, etc.

Now if I select an item in the tree view, the tree view gains input
focus. After this happens, my MDI children no longer are able to
obtain keyboard focus and therefore no longer receive keyboard
commands. Needless to say, that's a bad thing. :)

I've tried overriding OnClick() and adding a call to this.Focus(), but
no luck....

So what do I do?? The MDI windows themselves contain no controls as
the views are rendered directly onto the form using DirectX.

Any help is greatly appreciated,

Stephan


Nov 15 '05 #2
Thanks for the input..I ended up solving the problem by just making a
usercontrol as a view and using that with a fill dock to render onto.
That did the trick :) Can set focus to the view control now and
everything works :)

Thanks,

Stephan
On Thu, 05 Feb 2004 11:02:41 +0100, Antenna
<q1****************@hotmail.com> wrote:
So, if you click in the TreeView, you want to set the focus back to the
MDI window, is that what you want? If so, try setting the focus to the
MDI window in the MouseUp event handler of the TreeView. If that isn't
your problem, can you determine what form/control has focus?

Stephan Rose wrote:
Ok here's my situation...

Got an MDI application with a panel to my right that has a tree view
for the project stuff, etc.

Now if I select an item in the tree view, the tree view gains input
focus. After this happens, my MDI children no longer are able to
obtain keyboard focus and therefore no longer receive keyboard
commands. Needless to say, that's a bad thing. :)

I've tried overriding OnClick() and adding a call to this.Focus(), but
no luck....

So what do I do?? The MDI windows themselves contain no controls as
the views are rendered directly onto the form using DirectX.

Any help is greatly appreciated,

Stephan


Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by greg.scharlemann | last post: by
8 posts views Thread by copyco | last post: by
2 posts views Thread by SONIQ | last post: by
7 posts views Thread by creative1 | last post: by
2 posts views Thread by obtrs | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.