Recent

Author Topic: How to show a tooltip for axis, title and legend  (Read 627 times)

Muso

  • Full Member
  • ***
  • Posts: 209
How to show a tooltip for axis, title and legend
« on: April 18, 2021, 03:55:08 pm »
I use the amazing new TAchart tools like TAxisClikcTool with Laz 2.1.

My use case is that the user right-click on e.g. an axis and gets a dialog to change the appearance. This works nicely, but I need to inform the user about this. For other UI elements I therefore show a tooltip that e.g. the name can be changed by right-clicking on the name.

So the question is how can I display a tooltip e.g. just for the chart title, legend or axis?

wp

  • Hero Member
  • *****
  • Posts: 8550
Re: How to show a tooltip for axis, title and legend
« Reply #1 on: April 18, 2021, 05:30:32 pm »
Yes, this seems to be a valid request. Usually I would tell you that you should write a handler for one of the tool's MouseMove events and run the hit test method of the tool (GetHitTestInfoAt), but this routine as well as its results are not accessible from outside...

So, let me think about it for a while. Maybe I'll make the hit tests public or add a hint feature...
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

Muso

  • Full Member
  • ***
  • Posts: 209
Re: How to show a tooltip for axis, title and legend
« Reply #2 on: April 18, 2021, 05:40:51 pm »
So, let me think about it for a while. Maybe I'll make the hit tests public or add a hint feature...

Thanks for having a look. A hint feature for each title/footer, axis and legend would be useful.

 

TinyPortal © 2005-2018