Re: Re-using menus in ComboBox
- From: muppet <scott asofyet org>
- To: Christian Jodar <tian-ml c-sait net>
- Cc: gtk-perl-list gnome org
- Subject: Re: Re-using menus in ComboBox
- Date: Fri, 10 Apr 2009 20:29:05 -0400
On Apr 9, 2009, at 9:00 AM, Christian Jodar wrote:
Hello,
I would like to add to a toolbar a ComboBox. This ComboBox should
contain
some sub-menus of a menu in the main MenuBar. But I don't want to
make a
copy by re-creating everything in the ComboBox. Because the items in
these
sub-menus are some RadioMenuItems. So I'd like that when they are
checked
in the main menu, they become also checked in the corresponding item
of
the ComboBox (without having to manage that manually).
For this, you want to be using GtkUIManager. The combo would not be a
combo but a GtkMenuToolButton. Each item would be bound to a
GtkAction, so the states and callbacks would be the same regardless of
whether you were using the menu or the toolbar.
If you need something fancier, then you can derive your own widget
from GtkToolItem.
http://library.gnome.org/devel/gtk/stable/Actions.html
http://library.gnome.org/devel/gtk/stable/gtk-migrating-GtkAction.html
--
Me: What's that in your mouth?
Zella: *swallows laboriously* Nothing.
Me: What did you just swallow?
Zella: A booger.
Me: Baby girl, don't eat boogers. That's gross.
Zella: But it was in my nose.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]