Re: [gtkmm] Question to dynamically added menu items
- From: Anastasios Bassoukos <abas aix meng auth gr>
- To: "Andreas B. Thun" <abt gmx de>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] Question to dynamically added menu items
- Date: Tue, 10 Feb 2004 16:31:21 +0200
On Tue, 2004-02-10 at 12:16, Andreas B. Thun wrote:
> Hi!
>
> I have a MenuBar with a growing amount of MenuItems
> I add at runtime.
> All MenuItems are connected to the same CallBack-Method
> (donĀ“t know if this is ok, any ideas are welcome)
>
> My problem is: how do I know which MenuItem is selected?
> Is there a way to get an information like "3rd MenuItem selected"??
Use the template SigC::bind. With it you can effectively add another
parameter to the method you are calling. Or simply use the object-member
variant of the slot() function, with an Object[0] that knows the
necessary info you want.
HTH,
Tassos
[0] note that in that case it must inherit from SigC::Object
--
Beware of he who would deny you access to information, for in his
heart he dreams himself your master."
-- Commissioner Pravin Lal, Sid Meier's Alpha Centauri
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]