Hi,
When using a DPI setting of 125% our app scales nicely except for the AdvStringGrids. The row height is not increased which looks horrible, because the text does not fit into the rows anymore. Looking at the code I found the following:
procedure TBaseGrid.ChangeScale(M, D: Integer);
begin
inherited;
{$IFNDEF DELPHI_UNICODE}
if not (csDesigning in ComponentState) then
begin
if M <> D then
DefaultRowHeight := MulDiv(DefaultRowHeight, M, D);
end;
{$ENDIF}
end;
What is the reason behind the {IFNDEF..} ?
I have retested this here with the latest version of TAdvStringGrid on a Windows 8.1 with 125% DPI but cannot see an issue with text not fitting in cells.
Are you using the latest version of the grid and if so, how exactly can this be reproduced?
Hi Bruno,
Steps to reproduce:
- Set DPI to 96 (100%)
- Create a new VCL Application
- Add a grid with some contents
- Set the default row height to 18
- Compile and run
--> Text fits nicely into the rows (Screenshot 1)
- Set DPI to 120 (125%)
- Run the app (do not open in IDE, since it resets the form to 120 as base)
--> Text is enlarged but the row height stays at 18 --> Text is clipped (Screenshot 2)
I think removing the IFNDEF will adjust the row height accordingly, but it probably is in there for a reason ;)
I still cannot reproduce this. What Delphi version do you use?
XE2, I can send you the demo project if you want to
Please send us by email the demo project.