Would it be possible to include a function in TAdvTrackBar that will return the "Position" that will be the result of clicking with the mouse on a specified (component-relative) coordinate? Ie.
FUNCTION TAdvTrackBar.MouseToPosition(CONST P : TPoint) : INTEGER; OVERLOAD;
FUNCTION TAdvTrackBar.MouseToPosition(X,Y : INTEGER) : INTEGER; OVERLOAD;
where it will then return the value that will be jumped to, if one were to click with the left mouse button on those coordinates Min-1 if before Min (ie. if P.X<0) or Max+1 if after Max (ie. P.X>Self.Width) - both these for horizontal track bars.
I want to use this to have a hint window show some form of identification of the item jumped to when clicked, as the mouse moves along the track bar (without clicking). My own calculation is not the same as TAdvTrackBar uses, so my display is either off, or I have to correct the trackbar position afterwards, resulting in a slight "jump" of the track thumb first to the TAdvTrackBar calculated position and then to my own calculated position (so that the user always will hit the item that was shown in the hint).
I have all the other stuff done, but need a way to calculate the exact same position that TAdvTrack bar does.
As an additional bonus, it would also be nice, if this capability (continuous hint display based on mouse position within the track bar) were possible directly from the TAdvTrackBar, f.ex. by setting a "TrackMouse" property yo TRUE and then en event handler that returns the hint text to display for a given Position, but that is (to me) secondary, as I have already managed this with a custom hint window and trapping the MouseMove event.