Re: [gtk-list] Fwd: GtkList/GtkCList: key_press_event



On Wed, Aug 26, 1998 at 11:20:52AM -0700, Kamran Qazi wrote:
> >I am trying to handle the "key_press_event" on either 'list' or
> >'Clist' but am unable to do so as yet. It seems that no key presses
> >are sent to them. I even tried to handle the "event" which
> >essentially sends all the events and no key press event was there.
> >However, if you move up and down arrow keys, the selection bar does
> >move up and down. I didn't get it, how is it handling the up and down
> >arrow keys and not any other key presses?
> >
> >What I am trying to achieve is that if a user selects some row out of
> >a list/Clist, and then press the 'Del' key, that row should
> >disappear. Any help?

This is by no means an authoritative answer, but you might try one of
the following:

1) See if you can grab keypress events from the clist's parent toplevel window.
(e.g. connect to keypress events for the window)

2) Try putting the clist in an event box.  (I haven't had too much luck with
event boxes and keypress events yet myself, so I don't know about this one.)

3) Are you certain that the clist has keyboard focus?  If not, try focusing
the widget first. 


Dave



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