Hello all,

I am trying to implement a gtk.Button which can be resized (by grabbing it 
near its nower edge) and dragged around (by grabbing it somewhere near its 
center).  The gtk.Button is placed inside a gtk.Layout. I could get this to 
work by responding to mouse events WITHIN the Button. 

However this had the drawback, that the mouse may be too fast while resizing 
and the gtk.Button will not grow fast enough. Thus the mouse will leave the 
area of the gtk.Button and no more motion events will be sent to the Button. 
When moving the Button around this problem is less obvious, because the mouse 
is less likely to leave the area of the Button. None of these problems became 
apparent on my desktop box, but on my maemo handheld, the resizing simply 
didn't work.

So I thought, I'd better let the gtk.Layout handle the motion events. The 
strange thing is: it gets motion events only

- When the mouse is outside any gtk.Button
- When the mouse is inside a gtk.Button but no mousebutton is pressed

However no motion events arrive at the Layout when
- The mouse is inside a gtk.Button and a mousebutton is held pressed

I found two postings related to this issue:

- one had the exact same problem, but there were no replies
- it was said that gtk.Layout does not respond to events, as it does not have 
its own window. This is hard to believe, because my Layout does respond to 
events and I can influence the behavior (except for the problem described 
here)



-- 
Martin
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to