Re: re-jig two classes

: : I have a zigzag line called TWire (TObject). To avoid the clickable area from being a surrounding rectangle for the whole zizgzag, which would overlap others, I created a second class TWseg (TGraphicControl). I have an array of 6 TWseg within TWire.: : The end result is that the clickable area is only as thick as the line and follows it's contour. Also, which is essential, I can detect a mouse click on any segment and know which.: : My problem is, when I click on a segment I cannot tell which wire it belongs to and am not too sure about the sender use.: -------------------

: Add a property "Wire" to the TWSeg class, that gets/sets a pointer to the TWire that the TWSeg object belongs to. Example:

Thank you Willy for your time and effort. It is nice to have the full example and explanation.Your answer looks to be superb and I aim to try it today.If I have problems, which I don't foresee with your example, I hope I can come back to you.