Re: visual indication of the default button
- From: "Norman Black" <stonybrk ix netcom com>
- To: "gtk-app-devel-list" <gtk-app-devel-list gnome org>
- Subject: Re: visual indication of the default button
- Date: Fri, 8 Sep 2000 13:05:31 -0700
Awesome!, Thanks.
Interesting that a button that does not have the CAN_DEFAULT flag is allowed
to grab the default via gtk_widget_grab_default.
Best Regards,
Norman Black
Stony Brook Software
----- Original Message -----
From: "Carlos Pereira" <carlos pehoe civil ist utl pt>
To: <gtk-app-devel-list gnome org>
Sent: Friday, September 08, 2000 9:28 AM
Subject: Re: visual indication of the default button
In my dialog(s) is use gtk_widget_grab_default to set the "default"
button
for the dialog. This works but I see no indication of this on the screen.
When a button gets the focus by using the tab key it is drawn with a
black
border, but this is focus and not "default".
Does GTK have a visual indication of the default button, and if so how do
I
activate it. By visual indication I mean something like Windows, the Mac,
and others do.
Have a look at this, it might help you,
(things starting with app or APP are my own)
I think GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
is what you are looking for.
Carlos
button = app_gtk_create_button ("Ok", "black");
gtk_widget_set_usize (button, APP_BUTTON_WIDTH, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (function_ok), data);
button = app_gtk_create_button ("Cancel", "red");
gtk_widget_set_usize (button, APP_BUTTON_WIDTH, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_widget_grab_default (button);
gtk_widget_show (button);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (function_cancel), data);
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]