Thanks Roger,
I'm not really sure I understand what you are saying. If I try to
set the focus after I open the dialog (in the menu action) it does
not alter the behavior, i.e. the focus still ends up in the main window
with the menu bar.
I have debugged pivot while running this and (not unexpected) the
GUI behaves as i should during the debug session, i.e. when I step
through the code. But as soon as I run it full speed the dialog
looses focus. So for sure a timing issue. I have also tried to
experiment a little with the transitions in the skin but to no avail. As
one of you said earlier a complex thing this with focus and I have not
been able to wrap my brain around it yet. So if you could explain a bit
more what you have done I am all ear :-)
In addition to this what I have seen is if I disable "enable(false)" the
window
that contains the menu bar the focus stays with the dialog I open in the
menu action. i.e. the GUI behaves as expected.
Cheers,
Tomas
On 08/23/2012 06:13 PM, Roger L. Whitcomb wrote:
So, we have seen this too. The first manifestation was what you saw,
and we solved that one by just putting focus on the first component (or
the Window) after the "open" call of the dialog. But, the second
instance of the problem was when we tried to open some dialogs in a
second host window. That one we had to work around by disabling the
transition animations of the menus. Something in the event handling of
the animation timer was stealing focus from the secondary host window.
Haven't had time yet to figure that one out. But, subclassing the menu
and disabling the transition was a reasonable workaround for us.
~Roger
-----Original Message-----
From: Sandro Martini [mailto:[email protected]]
Sent: Thursday, August 23, 2012 8:38 AM
To: [email protected]
Subject: Re: Dialog opened from menu loses focus
Hi all,
yes probably the best solution for now is what suggested by Josh,
because focus management (and focus inside components) is a complex part
inside Pivot.
For mid/long term we could think on how to solve the problem, but for
2.1 .
Note:
I still have to ask to Thomas (the author of blockingdialog etc features
under pivot-contrib) if he is interested to become a Pivot Committer,
and then maybe move that part in core Pivot (maybe for 2.1) ...
Bye,
Sandro