Screen size in pixels

I want to know the size of the screen in pixels in order to calculate the ratio, which way to know it? Or is there a direct way to know the ratio of the screen?

Hello
simply google it?

GG

We’re here in the programming business, I can’t know the users screen size

in that case i would use % insted

My goal is to calculate the screen ratio so I need to know the screen size in pixels

why do you need to calculate it for?

if you don’t know the users screen sice, you can not define the px. correct me if I’m wrong…

Could have been a function like get screen.width like in the other components.

I want the application size to be according to a certain ratio, so that it is equal on all screen sizes. I just found that there is the function AspectRatio for screen size so i should try it.

Hi,

You can get that from the width and height blocks if you need it per device.

I stored it as a value to use later:
screen-res

:slight_smile: :+1:

1 Like

Thanks. You’re right, I searched for it on the screen elements and couldn’t find it, now I searched again thanks to you and found it on the device elements.device

1 Like

No worries, glad to help! :slight_smile: