When starting my app on a monitor set to 100% Windows display scaling Laptop screen) and then dragging it over to a 4K monitor set at something larger than 100%, such as 200%, the THTMLTreeView dies not rescale itself properly. Font seems to rescale but the line spacing does not.
THTMLTreeView 1.6.0.2
I found an issue with changes shown in my previous post so I deleted it and made a simpler change to htmltv which seems to fix the problem. Please let me know if this might mess anything else up. I added a conditional clause to check for the unused isDpiChange in ChangeScale like this:
This is strange. It works and scales fine on my 4K monitor connected to either of two PCs (one is Win11 the other is Win10) with either your fix or mine, but the customer is still having the same issue as does another customer that only has HD monitors. Both customers have multi-monitor setups as do I, and each monitor is set at different scaling.
Is there anything in your code that does something different on UHD monitors that isn't being done on HD monitors when it calculates the DPI Scale in GetDpiScale? Tomorrow I'm going to dust off an HD monitor I have to see if I can duplicate, but just thought I'd ask before I go to that trouble.
One thing they do that I have also tried is that they change the font size in the TreeView to something larger than 8... either 10 or 12, in which case I then set the ItemHeight to that times 2. But again, works fine for me.
Notebook with an external monitor (in my case the external monitor is 4K but shouldn't matter and the notebook monitor is HD).
Notebook set at 150% display scaling (in my case that is the recommended setting)
External monitor set at 100% display scaling.
External monitor set as the main monitor.
Launch app which shows up on external monitor since it it the main monitor.
Drag the app onto the laptop screen.
The THTMLTreeView items are now overlapping (and a standard TTreeView is perfect)