Reputation: 23088
I want a widget that displays an image and (can) call a function with the coordinates when clicked. I also want it to play nicely with being constrained by a horizontal box sizer.
What is a good widget for this purpose and the tutorial for the same?
Upvotes: 1
Views: 1898
Reputation: 33071
I wrote a tutorial that shows how to create a simple image viewer here. To get the coordinates of a mouse click, you'd need to catch EVT_LEFT_DOWN and then in the event handler do something like event.GetPosition() or event.GetX() and event.GetY()
Upvotes: 3
Reputation: 23088
To get a live image feed and update it on a panel:
Any quick Python GUI to display live images from Camera
To get the coordinates of a mouse-over and clicks:
http://www.python-forum.org/pythonforum/viewtopic.php?f=2&t=9877
Upvotes: 1