Re: EventBox and Bind
- From: "Sudrien" <sudrien fusemail com>
- To: gtkmm-list gnome org
- Subject: Re: EventBox and Bind
- Date: Fri, 31 Dec 2004 20:23:50 -0600 (CST)
OK, first problem fixed: functions called by buttons have to return a
boolean. Do things compile again.
Second problem: It seems the menuitems are catching all the mouse clicks.
I've read that one can add new events to be captured, but how would I
disable MenuIem events (so the eventbox underneath could get the signal)?
-Sud.
>
> Ok, If figured out the last menu question- it involved a lot of Menuitems,
> tables, and event boxes.
>
> Now I have the following code, and can't figure out a signal that will
> work with it.
>
> //////////////////////
>
> Gtk::EventBox * SubEventBox = Gtk::manage(new class Gtk::EventBox());
>
> #ifdef WIN32
> SubEventBox->add_label(tmp3+"\\");
> #else
> SubEventBox->add_label(tmp3+"/");
> #endif
>
> // skipping ....
>
> SubEventBox->set_events(Gdk::BUTTON_RELEASE_MASK);
> SubEventBox->signal_button_press_event().connect(
> sigc::bind<Glib::ustring>(
> sigc::mem_fun(*this, &PresentClass::PresentClassSelect), fullPath +
> tmp3 ));
>
> //////////////////////
>
> Now both fullPath & tmp3 are ustrings, and tmp3 will change several times
> as the menu generates. So I figure I have to bind them somehow. But I can
> get the compiler to run with anything I give it... and
> &PresentClass::PresentClassSelect rebuilds the menu based on the path.
>
> So how can I pass the information on, along with the button press
> information?
>
> -Sud.
>
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]