Re: retrieving key presses



> 
> Richard Harvey Chapman <hchapman@3gfp.com> writes:
> > I'd like to retrieve any keys that may have been pressed when a user
> > selected a GtkTreeItem.  I'd like to add a new type of selection to
> > GtkTree that behaves more like the windows style of selection.  Namely:
> > single_selection normally unless shift or control are pressed along with
> > the selection. 
> 
> You probably need to connect to button_press_event and keep track of
> the modifier mask (event->state) for the last button press, then use
> this info in some way. It's going to involve some ugly hacks. ;-)

But you shouldn't need to do that; it sounds like all you want is to
set the selection mode to GTK_SELECTION_EXTENDED, or does that not
work with GtkTree?  It definitely works with GtkCTree; perhaps it
would be easier to just switch to that.

-Rob





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