RE: [gtk-list] Re: HELP! How do I detect a shift-click




On 19-Jun-98 bert hubert wrote:
> This is what I try, but it doesn't work. Code:
> 
> void pickup(GtkWidget *w, GdkEventButton *e, gpointer p)
> {
> 
>     if(e->state&GDK_SHIFT_MASK)
>     {
>         printf("Shift-click!\n");
>         return;
>     }
>     else 
>       printf("Type: %d, State: %d\n",e->type,e->state);
> 
> }
> 
> Which is connected by:
> 
> gtk_signal_connect(GTK_OBJECT(eventbox),"event",
>             GTK_SIGNAL_FUNC(pickup),(gpointer) l);
>

Works ok for me with a text box. I suggest you send some complete
code for further help.

Tony
 

---
E-Mail: trog@gtk.org
"A raccoon tangled with a 23,000 volt line today.  The results blacked
out 1400 homes and, of course, one raccoon."
		-- Steel City News

Go Bezerk! http://www.gtk.org/~trog



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