Re: TreeView, Row and double click
- From: Nalin Singal <nalinsingal yahoo co in>
- To: cyril ponsan <kikiloizo hotmail com>, gtkmm-list gnome org
- Cc:
- Subject: Re: TreeView, Row and double click
- Date: Fri, 24 Jun 2005 01:02:45 +0100 (BST)
This code seems ok, but it would be easier to help you
if you posted the code which is attaching stuff to
treeviews or buttons.
-Nalin
--- cyril ponsan <kikiloizo hotmail com> wrote:
> Hello thank you for the answer,
> but i dont see the functions you told me about il
> the gtkm reference,
>
> but i sucessfully wrote a code to detect a dble
> click (inspired by a
> ggogelization ;) ) but it works only in a blank
> window...
>
> it doesn t work if i attach the
> signal_button_press_event() to a Button or a
> treeview...
>
> he is the code for the window : fenetre.cc
>
> #include <fenetre.h>
> #include <string>
> #include <iostream>
> fenetre::fenetre()
> {
>
> set_default_size(600, 600);
> set_position(Gtk::WIN_POS_CENTER);
>
> show_all();
>
> this->add_events(Gdk::BUTTON_PRESS_MASK);
>
this->signal_button_press_event().connect(sigc::mem_fun(*this,
>
> &fenetre::on_press));
>
> }
> bool fenetre::on_press(GdkEventButton *event)
> {
> static long unsigned lastclick = 0;
>
> if (event->type == GDK_2BUTTON_PRESS &&
> event->button ==1)
> {
> if (lastclick == 0 || (event->time - lastclick) <
> 600)
> lastclick = event->time;
> else
> std::cout << "Dble click" << std::endl;
> return true;
>
> }
> else
> return false;
> }
>
>
> im using gtkmm-2.4
>
> thanks :)
>
>
_________________________________________________________________
> MSN Search : des réponses à tous vos besoins !
>
http://www.imagine-msn.com/hotmail/default.aspx?locale=fr-FR
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
_______________________________________________________
Too much spam in your inbox? Yahoo! Mail gives you the best spam protection for FREE! http://in.mail.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]