Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header tooltip not always displaying #728

Open
jackdorsey opened this issue Sep 4, 2017 · 8 comments
Open

Header tooltip not always displaying #728

jackdorsey opened this issue Sep 4, 2017 · 8 comments

Comments

@jackdorsey
Copy link

HeaderBug.zip

Attached is a sample project - hover over the header - the tooltip is not always displayed.

@jackdorsey
Copy link
Author

Actually the tooltip starts displaying properly only after you click on a header and then hover a column header that is not highlighted.

@joachimmarder
Copy link
Contributor

A tricky one. In a few cases I see the describes behavior, but this is difficult to debug because it does not occur deterministic and stopping at a breakpoint changes the further behavior. I have no clue so far.

@joachimmarder
Copy link
Contributor

Actually the tooltip starts displaying properly only after you click on a header and then hover a column header that is not highlighted.

Even hovering was usually sufficient to get the tooltip at a later point.

@joachimmarder
Copy link
Contributor

Sorry, but after several hours of debugging I don't think it is worth the effort. In my case the hint is missing only rarely and never after the first user interaction took place.

@jackdorsey
Copy link
Author

Hello
I did not check if you changed something, but it seems a bit better than before. (I got the latest version to test your fix on the load header/repaint issue)

Further tests show that hovering the header from top or left - without entering the VT client area prior to entering the header cell almost never displays the tooltip. If you like you can check as this code part is still fresh in your head I guess. Current situation is not that bad, but I think this issue should stay open with low priority at least in case you decide not to investigate further.

Thank you.

@joachimmarder joachimmarder added Repro Steps Missing A smple project is needed to reprodcue and analyze the issue. See our guidelines for opening issues! Bug labels Sep 10, 2017
@joachimmarder
Copy link
Contributor

I did not check if you changed something,

I did not change anything.

Further tests show that hovering the header from top or left - without entering the VT client area prior to entering the header cell almost never displays the tooltip.

I agree, the likelihood seems slightly higher that the issue occurs. There is however no code that is specific for that. I guess it makes a difference if the mouse hovered over the client area of the control before hovering over the header.

It would help if there would be defintive and longer lasting repro steps, which is why i flagged this issue accordingly. I will leave it open for some more months, but I doubt that something will change.

@IgitBuh
Copy link

IgitBuh commented Feb 25, 2018

I tried the demo project and noticed an additional detail ... or actually another problem. I don't know if it has the same cause or if they're unrelated. But I thought, it's worth pointing it out:
tvt-header-tooltip

Notice, that the header highlight is not changing if the tooltip is shown.

@joachimmarder joachimmarder removed the Repro Steps Missing A smple project is needed to reprodcue and analyze the issue. See our guidelines for opening issues! label Feb 25, 2018
@joachimmarder
Copy link
Contributor

joachimmarder commented Mar 28, 2020

Possible reason for this behavior: Initially VCL creates a THintWindow instance and assigns it to TApplication.FHintWindow. THintWindow.IsHintMsg() tells the VCL to cancel the hint if a WM_NCMOUSEMOVE message arrive. TVirtualTreeHintWindow.IsHintMsg() does explicitely filter out those message regarding hint cancellation. This seems to be the reason that the header hint works as soon as a TVirtualTreeHintWindowwas displayed and so TApplication.FHintWindow is an instance of this class.

Another possible reason: The function FindVCLWindow() in unit Vcl.Controls returns nil if the coordinates of the Virtual TreeView Header are passed, as this is in the non-client area of the control, so TApplication.HintMouseMessage() does not recognize that a hint should be shown for the header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants