Recent

Author Topic: [solved] How to trigger TAxisClickTool by double-clicking  (Read 737 times)

Muso

  • Full Member
  • ***
  • Posts: 228
[solved] How to trigger TAxisClickTool by double-clicking
« on: April 18, 2021, 03:49:49 pm »
I use TAxisClickTool with Laz 2.1. When I set its shift state to "ssLeft" or "ssRight", everything is fine - the user clicks on the axis and the OnClick event is triggered.

When I now change the shift state to "ssDouble", it doesn't work. Since the tool has no "OnDoubleClick" event I don't know how to achieve that when double-clicking on the axis title, the "OnClick" event is triggered.
« Last Edit: April 18, 2021, 07:08:57 pm by Muso »

wp

  • Hero Member
  • *****
  • Posts: 8762
Re: How to trigger TAxisClickTool by double-clicking
« Reply #1 on: April 18, 2021, 05:12:21 pm »
In the Shift property, check ssDouble in addition to ssLeft, and it should work (just tested it myself).
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

Muso

  • Full Member
  • ***
  • Posts: 228
Re: How to trigger TAxisClickTool by double-clicking
« Reply #2 on: April 18, 2021, 07:08:41 pm »
In the Shift property, check ssDouble in addition to ssLeft, and it should work (just tested it myself).

Many thanks. This works, but the ChartEditor demo will then crash under certain circumstances, see this thread: https://forum.lazarus.freepascal.org/index.php/topic,54215.0.html

 

TinyPortal © 2005-2018