re:EVT_KILL_FOCUS problem Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
Adwaith
Earned a small fee
Earned a small fee
Posts: 20
Joined: Sat Nov 21, 2015 7:01 am

re:EVT_KILL_FOCUS problem

Post by Adwaith »

Hi,
I am using EVT_KILL_FOCUS to destroy my miniframe if my focus is lost. It seems to work fine in windows. I am using the same code without any change in RedHat Enterprise where my event does not get hit.

Code: Select all

EVT_KILL_FOCUS(MWListButtonControls::OnLostFocus)
The one above is the event I am using and MWListButtonControls is derived from wxMiniFrame and my version is wx3.0
Is there anything else I should be doing? Please let me know if I am wrong.
User avatar
eranon
Can't get richer than this
Can't get richer than this
Posts: 867
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: re:EVT_KILL_FOCUS problem

Post by eranon »

Hello, Not sure handling set/kill focus at frame level is the right thing to do... Hmmm, I guess you have a top panel directly inside your mini frame. What if you handle the EVT_KILL_FOCUS for this panel? Or, maybe, another way would be to handle EVT_ACTIVATE (fired when a window is activated and deactivated) at mini frame level.
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Adwaith
Earned a small fee
Earned a small fee
Posts: 20
Joined: Sat Nov 21, 2015 7:01 am

Re: re:EVT_KILL_FOCUS problem

Post by Adwaith »

Thanks a lot. This works great.
Post Reply