Support Board
Date/Time: Fri, 27 Dec 2024 18:06:45 +0000
Post From: How to see is the user drawing 'selected' or not ?
[2016-02-20 08:32:56] |
User921987 - Posts: 238 |
Thank you for the information. I allready have read the help files and was not able to find the answer for my question (or did not understand the way). So the case is this: 1. I draw 3 vertical lines on the chart 2. Then I select one of them by mouse (left click) -> the small dots will appear to it to show me that I have seleceted this line. 3. Now I will press the Custom Study Button in the Control Bar which will throw events for my Custom Study which is attached to the chart. What this Custom Study does is that it will loop through those lines on the chart but how do I find out which one of those lines is the one I have selected by the mouse (I would like to target the actions in my custom study only for that selected one) ? First I though you have a 's_UseTool' member variable which will tell is the drawing selected or not but didn't find any. So is there any other way to find out is the drawing selected or not ? Or am I trying to do this by wrong method and I should use the "right click above the wanted line" method and then using menus and mouse cursor position information ? Edit: No this is not a solution because the ACSIL added shortcut menu entries are not shown if the right click is done above the line it should be done elsewhere and this leads often to a situation where the code cannot be sure what is the user's target line for the command... ;( If this information is not available (is the s_UseTool selected or not) this can be done in another way by pointer events: For example first selecting the button (command) and then pointing the line but I see this is more complicated for the user because you have to remember to do the inactivation for the command. Would be less stress/easier by the selection method where the user just press the button for execution. Also if there is multiple lines close to each other it sometimes may be a bit tricky to choose the right one (have to zoom in more and this makes more hassle). Date Time Of Last Edit: 2016-02-21 08:51:20
|