Re: two button pressed



Am Do, den 15.04.2004 schrieb Johnny um 15:02:
hi, in my application i need that if i press ALT+q a window should be show. i'm
using gtk1.2 and i don't know how i can do this.

Hi!

I think this topic is covered by the tutorial, get it!

In principle you do something like this (this is pascal, can you read
it?):

        a         : pGtkAccelGroup;
        c       : pGtkButton;
        key     : guint;

...

        a := gtk_accel_group_new();
        c := buttons[0];
        
        gtk_accelerator_parse('F1', @key, 0);
        gtk_widget_add_accelerator(pGtkWidget(c), 'clicked', accgroup,
                                key, 0, GTK_ACCEL_VISIBLE);

HTH,
Marc





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