View Single Post
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#7
Originally Posted by luis View Post
For some reason, your on_motion function didn't work for me. It didn't even enter in the function...

But never mind, I decided to make another approach using a variation of your code (clicking in the image bring that pixel to the center of the widget).

But I have another question, if you don't mind: clicking in the arrows of the D-PAD cycles the focus through the widgets of the app. I want to use the D-PAD for better purposes, but it keeps moving the focus, even if I do some "...grab_focus". How I completely disable this focus cycle properties of the D-PAD?

Thanks a lot!!

L.
Sorry, I forgot that widgets have different default event masks. A gtkDrawingArea, for example, doesn't have any I think.

So, after creating the widget you would have to do the following:

Code:
myWidget.add_events(gtk.gdk.POINTER_MOTION_MASK|gtk.gdk.BUTTON_PRESS_MASK|gtk.gdk.BUTTON_RELEASE_MASK)
If the above suggestions for the d-pad focus issue don't work, let us know and we'll bang our heads some more.
__________________
N9: Go white or go home

Last edited by daperl; 2009-07-10 at 16:59.
 

The Following User Says Thank You to daperl For This Useful Post: