Jump to content
Sign in to follow this  
David P

TListView column widths with 125% font scaling

Recommended Posts

I'm having difficulty saving and restoring column sizes when the user has their Windows Scale and Layout Scale value set to 125% (i.e larger fonts).

 

With 100% font scaling, I can set and save the column widths without issue.  If I set a column at 100pix and the user does not change the width, then it will still be 100pix when I save the column widths.

 

With 125% font scaling, setting the column widths at 100, will result in a width of 125 when it comes to saving the  column width.  Using the Form's GetPixelsPerInch function I can save the 'base' width value.

 

The issue I'm having is that adding an Image to the column header to denote that the list view is sorted using that column also appears to add in a further offset when it's time to save the column widths.  This is only the case with non-100% font scaling.

 

Has anyone handled this to obtain the base width without scale or image offsets?

Share this post


Link to post

@David P This is an issue that AFAIK is mishandled differently in different Delphi versions.

It would be helpful if you specified your Delphi version in your profile.

 

As for the issue itself - I still work in DPI Unaware mode 😕

 

Share this post


Link to post

Thanks Lars.  Running C++ Builder 11.3 for any other that's have tackled this issue.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×