Re: [gtk-list] Underlining in menu's
- From: Damon Chaplin <damon karuna freeserve co uk>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Underlining in menu's
- Date: Wed, 24 Nov 1999 13:57:00 +0000
Jack L Calaway wrote:
>
> G'day:
>
> How do I underline a character in a menu label when using these functions:
>
> gtk_menu_item_new_with_label()
> gtk_check_menu_item_new_with_label()
> gtk_radio_menu_item_new_with_label()
> gtk_menu_item_new_with_label()
> gtk_menu_item_new_with_label()
>
> IE: is there a function like "gtk_label_set_pattern()" for menu's?
You do something like this:
GtkAccelGroup *menu_accel_group;
guint accel_key;
menu_accel_group = gtk_menu_ensure_uline_accel_group (GTK_MENU (menu));
menuitem = gtk_check_menu_item_new_with_label ("");
accel_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menuitem)->child),
_("Show _Only Working Hours"));
gtk_widget_add_accelerator (menuitem, "activate", menu_accel_group,
accel_key, 0, 0);
Using GtkItemFactory may be easier.
Damon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]