Form Input Focus

S

Stephan Rose

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
 
A

Antenna

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?
 
S

Stephan Rose

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top