TAdvStringGrid - wrong scaling

Hallo.

In our company there are several programmer and some of those work on 96dpi computers and other on 120dpi computers. And end users work with our program in a similar way.

The problem is when someone of us developed and built program on the 96dpi computer, then we run this program on the 120dpi computer. Or when we develop a program on the 96dpi computer then open it and resave TForm with TAdvStringGrid on it on the 120dpi computer and then run the program. In any way we have a problem working on computers that have different dpi.

For example see pic 1, 2 and 3. Pic 1 shows how to look like a main window of our program after we developed and ran it on 96dpi computer. Pic 2 shows the same form (without resaving and rebuilding) when we run the program on the 120dpi computer. Pic 3 shows the same form after we resaved it on the 120dpi computer and rebuilt the program. You can see different font sizes and heights between regular and fixed cells on the pic 2 and 3.

I think you can solve the problem if you change the method of calculating the font size in ChangeScale function. You have to calculate FixedFont.Height instead of FixedFont.Size. And you have to remove the verification of the csDesigning flag in the ComponentState. That’s just my opinion.

Pic1: http://yadi.sk/d/C2fCPQ2-4r4SM
Pic2: http://yadi.sk/d/GckgQs3o4r5Ey
Pic3: http://yadi.sk/d/ZNAU2uxU4r5Gg

Victor,


Also have a grid on our main form.  We had to create a ratio of designed screen height to run time screen height.  Same thing for width.  Then using this ratio loop through and resize the grid column widths and heights by this ratio.

We have to have two sets of ratios based on dpi.

Not fun to program and keep track of, but it works.

Chad

 

Anybody here? Is it support forum or not?