0

When I use TImageView component of the image within it is not appropriate to the size of the correct resolution of the mobile screen. For example, in some models the image becomes the white border on the top and bottom, on some devices the image is smaller than the screen, the other, add a piece of the image borders. How do I do that? There is some proportion to this problem and not deform the image or if I leave it on the component of fixed size?

Here are a few illustrations to understand better!

enter image description here

2 Answers 2

0

Put your image in a ScaledLayout and then in FormCreate method put this code

var
screenSize: TSize;
begin
  screenSize := Screen.Size;
  ScaledLayout1.Scale.X := screenSize.cx / ScaledLayout1.OriginalWidth;
  ScaledLayout1.Scale.Y := screenSize.cy / ScaledLayout1.OriginalHeight;
0

if you upgrade to Delphi XE7, you can resolve cross-platform screen size by using FireUI.

1
  • This would probably make more sense as a comment than an answer, since it doesn't really answer the OPs question.
    – Casey Rule
    Dec 4, 2014 at 20:41

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.