[pygtk] treeview drag and drop problem

Toon Verstraelen Toon.Verstraelen at UGent.be
Mon Mar 29 18:37:21 WST 2004


Johan Dahlin wrote:

> On Mon, 2004-03-29 at 13:01, Toon Verstraelen wrote:
>>I've made a simple example in which I enable a drag_source and drag_destiantion 
>>in an treeview. I used the gtk.gdk.BUTTON1_MASK to ensure that the user can only 
>>drag with the left mouse button, but it seems that the user can use any button 
>>to start the drag session. How can I prevent this?

> Perhaps you can try to connect to button-press-event on the treeview and
> filter out (by returning False IIRC) events on second and third mouse
> button, or handle them in there, eg showing a popup or whatever.

Hi,

I tried to return False in the on_button_press event I connected to the
treeview, but this has no effect. The event handler get's certainly called
because I popup a menu when the user clicks a button (not in the example in my
former mail, but in another appliction)

greetz

Toon



More information about the pygtk mailing list