Re: Tool tip with out Mouse ?



Am Dienstag, den 13.09.2005, 09:57 +0530 schrieb sadhees kumar:
i'm using using only the following keys in my application
1.Left arrow
2.Up arrow
3.Down arrow
4.Tab(instead of Right arrow)
5.Enter key(Return Key)
 
Is that possible with these keys?

In the _class_init of your widget, you'll have to add code like:

GtkBindingSet *binding_set;

binding_set = gtk_binding_set_by_class (klass);
gtk_binding_entry_add_signal (binding_set, GDK_Return, 0,
                              "show-help", 1,
                              GTK_TYPE_WIDGET_HELP_TYPE,
                              GTK_WIDGET_HELP_TOOLTIP);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0,
                              "show-help", 1,
                              GTK_TYPE_WIDGET_HELP_TYPE,
                              GTK_WIDGET_HELP_TOOLTIP);

You can probably also manually enforce displaying the tooltip using:

g_signal_emit_by_name (foo_widget, "show-help",
                       GTK_WIDGET_HELP_TOOLTIP);

 
On 9/12/05, Christian Neumair <chris gnome-de org> wrote: 
        Am Montag, den 12.09.2005, 16:39 +0530 schrieb sadhees kumar:
        > hi friends,
        >  In my application, i am not using mouse. But i want to
        display the tool 
        > tips. If i get the focus for any particular widget, i need
        to display the
        > tool tips for that widget...
        >  Is that possible?
        
        Try ctrl-F1. The private API involved is
        gtktooltips.h:void
        _gtk_tooltips_toggle_keyboard_mode 
        (GtkWidget *widget);
        
        --
        Christian Neumair <chris gnome-de org>
        
        
        -----BEGIN PGP SIGNATURE-----
        Version: GnuPG v1.4.1 (GNU/Linux)
        
        iD8DBQBDJWjWWfvsaU5lO4kRAlEFAJ0SCIwe9H5pWfz
        +/u6S/9KKeBJrNwCgnIYY 
        gbY2iSA8nonELi/6tVPq49U=
        =ZmSo
        -----END PGP SIGNATURE-----
        
        

-- 
Christian Neumair <chris gnome-de org>


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