Re: one function to go...



On Sun, Dec 23, 2012 at 10:57:47PM +0100, Andreas Rönnquist wrote:
On Sun, 23 Dec 2012 13:39:46 -0800,
Gary Kline<kline thought org> wrote:



    guys,

    I need one 'quit' button in a small widget that says via the
    label = gtk_label_new("File does not exist");, and displays
    "OK" with the "Enter" key icon.   Instead of having the user
    click  on a "Quit" or "Close" button, just hitting "Enter"
    would return control to the calling function.  I already have
    the "Close"  code roughed out.  I want the GTK_BUTTON_OK in
    there to let hitting "Enter" work.

    thanks for any clues.

Do you mean that you have a OK button, and that button should be
activated when pressing enter?


        in this "popup" dialog I would have a few words that the
        "file does not exist" and want a button WITH the "Enter-key"
        icon that gives an iconic clue that all the user need do is
        hit the enter key.  I suppose if the users could, if they wished,
        mouse-click on the button.


In that case, the function gtk_widget_grab_focus might help:

http://developer.gnome.org/gtk3/3.6/GtkWidget.html#gtk-widget-grab-focus


        thanks for the URL; I'Ll give it a look!


-- Andreas Rönnquist
mailinglists gusnan se
gusnan gusnan se


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


-- 
 Gary Kline  kline thought org  http://www.thought.org  Public Service Unix
              Twenty-six years of service to the Unix community.




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