When I click on a (standard/normal/OBJ_BUTTON) button, if the click is at or near a horizontal line, the line will be selected too (because the option "Select object by single mouse click" is activated), which is undesireable for me.
How can I make it so that only the button is clicked and NOT other objects on the chart?
I tried to set the OBJPROP_ZORDER to high values from 10 to 1000000, but there is no effect. The OnChartEvent correctly detects the button object being clicked.
@WHRoeder, I already tried you EA before posting, hoping you have found the anwer :) But it has the same problem when the option "Select object by single mouse click" is enabled. I assume you have disabled it and that's why you can't select horizontal lines beneath it by a single click.
In this case if you put HL beneath the 1,2,3,4 Ratio buttons and DOUBLE CLICK one of the buttons, you should be able to select the HL.
I noticed that when this option is enabled and one clickes on a button near/above an already selected horizontal line, an additional CHARTEVENT_CHART_CHANGE event is sent, which is not the case when the option is disabled. I thought I could change the selected state of the object back to its previous state, but I could not find a way to get the object given the X and Y coordinates delivered by the CHARTEVENT_CHART_CHANGE event.
To add comments, please log in or register