Re: [gtkmm] Access CheckMenuItem after inserted into menu?
- From: Paul Davis <paul linuxaudiosystems com>
- To: D Bently <dbently bigpond com>
- Cc: gtkmm-list gnome org
- Subject: Re: [gtkmm] Access CheckMenuItem after inserted into menu?
- Date: Wed, 22 Jan 2003 12:05:13 -0500
>I am constructing the gui interface for several tools, using gtkmm
>2.0.2. Just quickly, I am trying to access the original elements
>inserted into a popup menu. See code at the end. Explination of problem
>below.
>
>Okay, I have puzzled over this one for a few days now, and know there is
>some easy answer... I have a popup menu that contains a whole set of
>CheckMenuItems (the real number is about 50 items that are loaded from a
>text file).
its a bit late, but instead of:
> menulist.push_back(Menu_Helpers::CheckMenuElem("abc",
> SigC::slot(*this, &ClassTest::ChangeLabel)));
do this:
menulist.push_back (Menu_Helpers::CheckMenuElem ("abc",
SigC::bind (SigC::slot (*this, &ClassTest::ChangeLabel),
some_other_arg);
void ClassTest::ChangeLabel (SomeOtherArg arg)
{
... now you now which one was clicked/activated ...
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]