Re: Button and Window Questions



I've looked at the GnomeDialog source
(http://cvs.gnome.org/lxr/source/gnome-libs/libgnomeui/gnome-dialog.c) and
have used the following calls to try and get my button to grab "default" - but
it still doesn't do it:

GtkWidget *button;
button = gtk_button_new_with_label ("  OK  ");
GTK_WIDGET_SET_FLAGS (GTK_WIDGET (button), GTK_CAN_DEFAULT);
gtk_widget_grab_default (button);
gtk_widget_show (button);

And this still won't grab default.  I did try the above syntax before I knew
about gnome-dialog.c, but it didn't work.  It appears GnomeDialog is doing it
in some strange way that's beyond me :-(

Is grabbing default really that difficult?  Calling GnomeDialog won't suit in
my case as I don't want the horizontal line above the action area.  I just
want a button that will grab the default.

=====================================

Havoc Pennington wrote:

> Hi,
>
> The panel stuff is done with GnomeDialog, which makes these things easy.
> You might look at the GnomeDialog source code in gnome-libs;
> libgnomeui/gnome-dialog.c. (You can find it on www.gnome.org too in the
> LXR source browser.)
>
> Havoc
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null





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