TChart DatapointHintTool lazarus / 55-TAChart ---------------------------------------------------------------------- wp · 2012-05-04 23:42 I am using the TDatapointHintTool for the first time. The tool uses Shift = [ssLeft]. The hint does appear upon clicking with the left mouse button, but only after I have moved the mouse a little bit. Then the hint belongs to the datapoint where the mouse-up occurs. I am doing something wroing? My expected behavior would be that I click on the data point to be queried and get an immediate hint popup for this point. ---------------------------------------------------------------------- Ask · 2012-05-05 11:38 Usually, hints are supposed to be displayed on mouse-over, and this is currently the only mode of operation for TDatapointHintTool. If you want hints to be displayed on mouse-down, there are two questions/problems: 1) When the hint should be hidden? On mouse up? On the next mouse down? On the mouse-move-away or after HintHidePause milliseconds, as now? Some combination/option of the above? 2) How to display a hint at an arbitrary moment without too low-level code? Currently, Application.ActivateHint is used, which is reasonably high- level interface, but specifically requires mouse buttons NOT to be pressed (see GetHintInfoAt procedure). ---------------------------------------------------------------------- wp · 2012-05-05 21:08 QuoteUsually, hints are supposed to be displayed on mouse-over, and this is currently the only mode of operation for TDatapointHintTool. That explains a lot. I was misled by the Shift options being there like for all the other tools and I was thinking that I could use the DataPointHintTool in the same way as I did with the DataPointCrosshairTool. Knowing that I think the present implementation is fine. But ideally the Shift property should not be published here to avoid confusion. At least a sentence in your documentation would be a help as a "disclaimer". ---------------------------------------------------------------------- Ask · 2012-05-06 01:41 QuoteShift property should not be published here Keyboard modifiers still work -- you can have hint displayed only when Alt is pressed. Quotea sentence in your documentation Done ---------------------------------------------------------------------- wp · 2012-05-06 08:56 Thank you. But in my test program even the Alt button results in a flickering, mostly hidden hint window. The hint window follows the data smoothly only when no Shift option is selected. ---------------------------------------------------------------------- Ask · 2012-05-07 07:42 Indeed. Should be fixed in r37208-37210, please test ---------------------------------------------------------------------- wp · 2012-05-08 15:59 Thank you. I tested Alt, Ctrl and Shift - all working. However, the hint does not disappear when the key is released at least on my system (Win7). ---------------------------------------------------------------------- Ask · 2012-05-09 05:12 QuoteI tested Alt, Ctrl and Shift - all working. Mouse buttons should work too. Quotehint does not disappear when the key is released Note how it is implemented in the dragdrop demo. Basically, TChart component must have focus to get keyboard events. I do not know if there is a workaround other then to set the focus manually. ---------------------------------------------------------------------- wp · 2012-05-09 14:05 QuoteTChart component must have focus to get keyboard events. Ah, I remember we had that in a previous discussion. Thank you.