I have a situation where I want my code to do something when eg. a trendline is clicked.
I also want to be able to move the line without the code being executed.
My problem is that when I double click to select the line to move it, the first of the 2 clicks activates the CHARTEVENT_OBJECT_CLICK and executes the code.
I can't make a condition that checks whether the object is selected, because the object is not selected until the 2nd click.
I can't think of a work around.
Create an additional Button which when clicked performs the required action.
A variant of sxTed's idea: create a small innocuous button that acts as a toggle. When clicked, the CHARTEVENT_OBJECT_CLICK code doesn't fire. Once you're done, toggle your small button back again.
Or, turn on single-click object selection and make your other code work on a double-click (will need code to measure the time interval in order to establish whether it was as double-click).
Yes, I think that is the way to go.
To add comments, please log in or register