wxSkinSimpleFrame derived, key events problem Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
spectrum
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Sat Jul 21, 2007 12:17 pm

wxSkinSimpleFrame derived, key events problem

Post by spectrum »

Hi All,

i know the author of wxSkin is very active in the forum and will probably read this post.

So congratulation for this really nice job, even if alpha, it is working really fine in my application !

So i don't know if this problem is related to wxSkin:

Code: Select all

BEGIN_EVENT_TABLE(FrmMain, wxSkinSimpleFrame)
	....		
	EVT_KEY_DOWN	(FrmMain::OnKeyDown)
	EVT_KEY_UP		(FrmMain::OnKeyUp)
END_EVENT_TABLE()
pressing buttons, no key down event is triggered.

every help is appreciated.

regards,
spectrum
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

Hi!
Thanks :)

This problem is not related to wxSkin. Catching key events in a frame can be hard, as the frame almost never has keyboard focus (the controls inside it do). I don't know what you want to achieve, but it may be better to try and use wxApp::FilterEvent() as this would catch all events for all controls (even the frame).
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
spectrum
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Sat Jul 21, 2007 12:17 pm

Post by spectrum »

thanks upCASE,

i solved with the filtering.

Hope wxSkin can finally be introduced in wxWidgets, on 3.0.0, could it be ?

Anyway it is really nice also as additional library!

regards
spectrum
Post Reply