Focus for AUI panes

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
RossGK
In need of some credit
In need of some credit
Posts: 4
Joined: Thu Aug 21, 2008 8:31 pm

Focus for AUI panes

Post by RossGK » Fri Oct 17, 2008 2:55 pm

The issue of managing focus has come up for me a couple of times and so I should stop putting off figuring it out. I'm using an AUI framework much like the wxPython demo provides. Two situations are dogging me: Using a menu, I show() a pane which I use as a dialog to set some parameters. On the Win32 platform, when I close it, focus does not return to the other docked AUI panes behind it, but rather to my Eclipse PyDev environment, and I have to click the open AUI stuff to get focus on it again.

Second situation - I took a pane that was previously part of the docked panes in my AUI frame, and made it a floating pane instead. It comes up in front of the other docked AUI panes, but to interact with it, e.g. to click a wxButton on the pane, I have to click once to get the focus and again to hit the button.

Googling thru documentation I find very little reference to "Focus" - Is there somewhere I should be looking for how to manage it? Does wxPython use some other term instead of 'focus'?

Is there some method equiv. of:

self._mgr.GetPane("myPane").HasFocus(True) # not real code!

Any help appreciated,

Ross.

SIAS87
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sun Jul 20, 2008 10:08 pm

Post by SIAS87 » Tue Nov 04, 2008 8:18 pm

I had the same problem although mine was with sliders, so it may not work with AUI elements.
i used the SetFocus() function
http://docs.wxwidgets.org/2.8.6/wx_wxwi ... owsetfocus
i dnt know why it says it only focuses the keyboard.
Dan

Post Reply