Search code examples
wxwidgets

Movable object in a wxFrame


I would like to draw an object(E.g Circle/Rectangle) on a wxFrame and have an event handler attached to each object such that onMouseDown, the object can be relocated to another position.

Currently, I'm not able to find any given samples or solution to go about this. I appreciate any help related to this problem.


Solution

  • As I mentioned you shouldn't draw on a wxFrame. Instead you can use a wxPanel to draw your stuff. Here is a link with a drawing example