Re: [gtk-list] Underline menu Characters
- From: Dave Reed <dreed capital edu>
- To: gtk-list redhat com
- CC: gtk-list redhat com
- Subject: Re: [gtk-list] Underline menu Characters
- Date: Tue, 22 Jun 1999 11:09:59 -0400
> From: Edward March <emarch@enteract.com>
>
> Hi How Do I under line the 'F' of the File Menu
> Connecting a ALT+F to the File menu work, but I want
> To underline the F
>
> Typicalls its '&File' or '^File' or '~File' isnt there some
> special char to make it underline ? What is it -- Thanks
Put an _ in front of the letter you want to underline and alt-letter
will get you that menu.
Snippets from some of my code that demonstrate this:
static GtkItemFactoryEntry menu_items[] =
{
{ "/_File", NULL, 0, 0, "<Branch>" },
{ "/File/_Save Image", "<control>S", file_save_cb, 0},
{ "/File/tearoff1", NULL, NULL, 0, "<Tearoff>" },
{ "/File/sep1", NULL, NULL, 0, "<Separator>" },
{ "/File/_Quit", "<control>Q", file_quit_cb, 0},
};
static int num_menu_items = sizeof (menu_items) / sizeof(menu_items[0]);
...
GtkAccelGroup *accel_group;
GtkItemFactory *item_factory;
accel_group = gtk_accel_group_new ();
item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>",
accel_group);
gtk_item_factory_create_items (item_factory, num_menu_items,
menu_items, NULL);
gtk_accel_group_attach (accel_group, GTK_OBJECT (main_window_));
Dave
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]