Re: Gtk2::DrawingArea




Mitchell Laks wrote:
On 02:56 Tue 05 Feb     , Mitchell Laks wrote:

Why is the Gtk2::Window eating the key-press events, but not eating the
pointer-motion events or button-press events
which seem to propagate nicely to the child Gtk2::DrawingArea.

By virtue of adding the key-press-event mask to the widget's event set,
the drawing area is set up to monitor key-press-event, but is not allowed to
take keyboard focus until you enable it.  You need to do

  $draw->can_focus (TRUE);


-- 
muppet <scott at asofyet dot org>




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