OpenGL Component


#1

Hi,
While using OpenGL Component on Mac OS 10.4 , I noticed that overriding
void keyPressed (const KeyPress& key);
void keyStateChanged();
has no effect.
ie. control never gets in there on keyboard events.
Is this a bug or am I doing something Wrong.

Thanks,
Yogi


#2

did you call its setWantsKeyboardFocus() method? By default some components don’t take the focus unless you explicitly tell them to, and will only get keys sent to them if they have the focus.


#3

Thanks, that was the problem.

Yogi


#4