Re: make manu item label bold (default)
- From: Stefan Kost <kost imn htwk-leipzig de>
- To: gtk-app-devel-list gnome org
- Subject: Re: make manu item label bold (default)
- Date: Thu, 09 Dec 2004 15:44:27 +0100
hi hi,
just for the records, this is how I solved it:
menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_PROPERTIES,NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(self->priv->context_menu),menu_item);
// make this menu item bold (default)
label=gtk_bin_get_child(GTK_BIN(menu_item));
if(GTK_IS_LABEL(label)) {
char *str;
str=g_strdup_printf("<b>%s</b>",gtk_label_get_text(label));
gtk_label_set_markup(label,str);
g_free(str);
}
gtk_widget_show(menu_item);
Stefan
Stefan Kost wrote:
hi hi,
in a context menu, I have a manuitem created by
gtk_image_menu_item_new_from_stock().
This menuitem is the default action for the object, thus I would like to make
the label bold. If I would crate the menuitem by hand, I would use the markup
feature, but how to 'activate' thsi for a stock item?
any ideas?
Stefan
------------------------------------------------------------------------
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
--
\|/ Stefan Kost
<@ @> private business
+-oOO-(_)-OOo------------------------------------------------------ - - - - -
| __ Address Simildenstr. 5 HTWK Leipzig, Fb IMN, Postfach 301166
| /// 04277 Leipzig 04251 Leipzig
| __ /// Germany Germany
| \\\/// Phone +49341 2253538 +49341 30766101
| \__/ EMail st_kost_at_gmx.net kost_at_imn.htwk-leipzig.de
| WWW www.sonicpulse.de www.imn.htwk-leipzig.de/~kost/about.html
===-=-=--=---=---------------------------------- - - - - -
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]