Skip to content

Conversation

@Torbins
Copy link

@Torbins Torbins commented Jun 5, 2025

On HiDPI screens column widths are calculated incorrectly in TJvDBGrid. This leads to horizontal scrollbar appearing and grid content scrolling horizontally when user is trying to edit data in last column.

try
// Get useable width
ColLineWidth := Ord(dgColLines in Options) * GridLineWidth;
ColLineWidth := PPIScale(Self, ColLineWidth);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why introduce a new assignment when the call to PPIScale could be made inline, just like what's done elsewhere?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have written this code in Delphi 11 and was not sure about changes in Delphi 12. Now it looks like code related to GridLineWidth is stable, and conditional compilation will not be required. I can change this fix to be inline.

@obones obones force-pushed the column_autosize_hidpi_bug branch from e24edb9 to 771c00d Compare August 13, 2025 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants