Support Board
Date/Time: Sun, 22 Dec 2024 14:33:39 +0000
SC_POINTER_BUTTON_DOWN not firing?
View Count: 1217
[2015-02-24 20:14:36] |
onnb - Posts: 662 |
I have a custom tool that used to work in the past but is no longer working the same. The tool uses the mouse and pointer events together with the tool api to draw lines on the chart. Here is what is happening: 1. I select my tool from the tool bar menu (SC_ACS_TOOL1) (and I have the cross hair selected too) 2. I click on the chart. My study receives the pointer down event and I start to draw a line from that point. 3. As the mouse is moved on the screen, I continuously receive the pointer move event and redraw the line from the original point to the current point. Up till here no problems. 4. I now click on the chart and expect to receive the pointer down event but I don't receive it. I do continue to receive the pointer move event. A few notes on this: * I do notice that when I click on the chart, the line I draw becomes "selected". I also see that the cross hair is still active and I am still receiving "move" events. I'm just not receiving the down event. * This is not 100% consistent. Once in a while I do receive the mouse down event in step 4. Still can't figure out when. * I noticed that sometimes when I click on the chart, the cross hair tool becomes inactive and some other tools becomes active. for example, the trend line tool might become active. My tool is still active and I still receive mouse events. If the cross hair is not active, I was expecting to not receive mouse events. But the basic issue I have is that I am getting the mouse down event consistently and am not sure why. Any ideas? |
[2015-02-25 03:57:15] |
Al SC Developer - Posts: 434 |
When you are drawing your line, is it "user drawn" (AddAsUserDrawnDrawing is set)? If so, do not turn this attribute on until you draw the final drawing after the final mouse click. |
[2015-02-25 06:24:33] |
onnb - Posts: 662 |
It is indeed being drawn in all stages as user drawing. I now turn the attribute true on the final mouse click and receive the pointer down event just fine. That said, the final drawing is not created as user drawing. Its created as a regular drawing. Just to be clear if this matters: I initially create the line. When the user moves the mouse and on the last mouse down, I update the existing line end points using the line number. Date Time Of Last Edit: 2015-02-25 06:25:11
|
[2015-02-25 12:11:12] |
Al SC Developer - Posts: 434 |
Currently, a drawing can not be converted from non-user drawn to user drawn. We are evaluating a more robust solution. |
[2015-02-25 13:52:07] |
Al SC Developer - Posts: 434 |
To solve the original problem, set sc.BlockChartDrawingSelection to one when you start your drawing on first click, and then set to zero when drawing is complete on final click. This will block the selection of the user drawn drawing that you added, and allow the mouse clicks to be properly routed to your study.
|
[2015-05-30 06:43:06] |
Sierra Chart Engineering - Posts: 104368 |
Could you please confirm if this problem is now resolved by following the instruction in post #5.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2015-05-30 07:28:12] |
onnb - Posts: 662 |
yes, #5 solved it.
|
To post a message in this thread, you need to log in with your Sierra Chart account: