Re: Widget mask out clicks



Thanks Chris,

    I tried your statement as follows :-

    m_TreeView = new Gtk::TreeView();
    m_TreeView->set_events (m_TreeView->get_events() &
~Gdk::BUTTON_PRESS_MASK);

    As you can see, I can't perform set_events any earlier than this as
m_TreeView is created by the immediately       preceeding instruction; 
however, it still allows mouse clicks through.

   Is Gdk::BUTTON_PRESS_MASK the correct bit mask to use ?

  Regards

  John

Your original approach was right: set_events() will reset the event mask (as 
opposed to add_events() which will not), although a better approach may be
to 
call m_TreeView->set_events(m_TreeView->get_events() & 
~Gdk::BUTTON_PRESS_MASK).

However, did you call set_events() before the widget was realised?  It won't 
work if you do not.

Chris

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list



-- 
View this message in context: http://www.nabble.com/Widget-mask-out-clicks-tf2912405.html#a8162710
Sent from the Gtkmm mailing list archive at Nabble.com.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]