Re: Widget mask out clicks



> That is the only way to do it if you want dynamically to switch event
handling 
> on and off after the widget has been realised.  However, none of that
> should 
> be necessary if you set the event bit mask correctly and you do so before
> the 
> widget concerned is realised.

I certainly don't  want to dynamicaly change the event mask (assuming that
there is an individual event mask for EACH widget).   All I want is for the
tree view to be unresponsive to mouse clicks.

What do you mean by "realising" the object ? Do you mean creating the object
?

If so, how can you set the event bit mask for the object before the object
is created - I would get a segmentation fault - attempt to use a NULL
pointer.

If you mean that realising the object is "showing" it, then I set the event
bit mask well before then.

I set the event bit mask with the instruction immediately after creating the
object, you can't get it any earlier than that ? can you ?

<snip>
    m_TreeView = new Gtk::TreeView();
    m_TreeView->set_events(m_TreeView->get_events() &
~Gdk::BUTTON_PRESS_MASK);
</ snip>
-- 
View this message in context: http://www.nabble.com/Widget-mask-out-clicks-tf2912405.html#a8217047
Sent from the Gtkmm mailing list archive at Nabble.com.




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