Focusing on a Drawing Area



Hi,

I have an application written in gtk by glade, which has a number of
buttons etc and a single drawing area.

I would like the arrow keys to have special significance in the drawing 
area.

The first thing is getting the focus into the drawing area.

I can set the drawing area to have focus at start up .. this is okay.
but when I have clicked a button, I need to tab my way through all of
the other buttons to get the focus back to the drawing area :-(

I have got code that knowns when the mouse have moved over the drawing area
but this does not give it the focus.

How can I, via a click in the drawing area force the focus to it ??

Secondly. Once the drawing area has got focus, I can assign accelerator
keys to "A" "a" etc, and track when the keys have been released. But 
it does not seem to like using the arrow keys as accelerators  (as these 
are the default method to move between buttons - changing the focus.

What is the best way to assign the arrow keys, so I can pick up their
release in a drawing area (which has focus), WITHOUT the system taking
their depression to select the next item for passing focus to ??

I hope this makes sense, and look forward to your combined wisdom...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Colin Thomas. 
| Email   : colin designresources co uk     
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]