Lazarus

Programming => Operating Systems => Android => Topic started by: shyub on March 17, 2021, 06:55:22 am

Title: Screen resolution and aspect ratio
Post by: shyub on March 17, 2021, 06:55:22 am
Hello!
How can I make the interface look the same at different screen resolutions?

I am doing this:
- I create several identical pictures 72x72, 100x100, 136x136;
- I put them in jImageList;
- when starting the program, I determine the screen resolution;
- I display a picture of the appropriate size on jImageBtn.

Am I doing the right thing or is there another way?

It would be very nice if it was possible to place 3 jImageList on the form and store images with different resolutions in them, but this cannot be done.
Maybe there is a way to store images somewhere in the resources, and load them into jImageList at startup, but I don't know how.

The figure below is an example of what the interface looks like if the above is not done.
TinyPortal © 2005-2018