I again have a focus problem !!!
Simple explanation of I want to do :
I've got 2 wxFrame :
- My main application, that has a lots of controls
- A frame that display logs (messages, errors, etc...) in the bottom of my screen. This frame only shows when a new message is displayed, stays displayed 5 seconds, and then it is closed.
In my main application, let's take this example : I've got a text control that doesn't accept all letter (for example, "&" is forbidden). In this case, it raises a message error, and the log window appears !
The product effect is that the log window is now focused for 5 seconds. When it closes, the focus come back on the main application, in my text control.
Want I want to achieve :
When the log shows, to display errors, the focus remains on the main application, in the text control I was writing in....
Is there a way of doing this ?
That is to say : the log window only shows, but never receive the focus ?
Or should I do it manually, that is to say, when the main frame losts the focus, save the previous object the has this focus, and when the message is written in the log panel, set back the focus to the main frame that broadcasts it to the inner object that was previously saved, etc..... that is really complicated because I have several nested panels in a notebook, and a lots of controls into......
Here is a screenshot that tells :

So, when "Letter not accepted" is written, I want the focus quickly comes back to where it was, before waiting 5 seconds the log windows closes.
Do you have an idea ?
Thanks a lot.