Adding custom handlers to custom objects
Vadim Zeitlin
vadim at wxwidgets.org
Thu Oct 25 16:53:30 PDT 2007
On Thu, 25 Oct 2007 15:52:13 +0100 Declan McMullen <declan.mcmullen at dmuknet.com> wrote:
DM> For a simple example say I draw a line on screen. If I click on it I'd
DM> like to open up a color picker to change the color of the line. Is it
DM> possible for me to add an event handler to that line object that can be
DM> triggered when I click on it ?
No, you'll need to do your hit testing yourself. Libraries such as wxArt2d
or OpenGL mentioned in another thread about this implement this "selection"
for you, although it's not really difficult to do for 2D drawings (OpenGL
implements it for 3D ones too, of course).
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list