El jue, 17-03-2005 a las 14:19 -0600, David Kinyanjui escribió:
> Hello everyone;
> I need help...
> I'm trying to implement a signal on the click of the left mouse button
> over a Gtk::TextView.
> Here is my code:
>
> bool myWindow::on_textview_clicked(GdkEventButton* event)
> {
> if (event->button == 1 || event->type == GDK_BUTTON_PRESS )
> cout<<"textview clicked..."<<endl; //do some stuff here....
> return false;
> }
>
Have you tried with:
if (event->button == 2 && event->type == GDK_BUTTON_PRESS )
??
> Then, in the constructor:
> m_textview = NULL;
> m_refGlade->get_widget ("m_textview", m_textview);
> m_textview->add_events(Gdk::BUTTON_PRESS_MASK);
>
> m_textview->signal_button_press_event().connect(
> SigC::slot(*this, &myWindow::on_textview_clicked));
>
> Now, after I have done all that... the textview is only receiving the
> signal only when I press the middle wheel button.
>
> I even tried to add an Gtk::EvenBox .... I got the same result!!
> By the way... I'm using Gtkmm version 2.2
> Any help is appreciated.
> Thanks
>
> David Kinyanjui
>
>
>
>
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
--
-----------------------------------
Diego Fdez. Durán <diego goedi net>
Web: http://www.goedi.net
GPG ID: 90D266BB
-----------------------------------
Attachment:
signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente