# Screen size in pixels

**URL:** <https://community.thunkable.com/t/screen-size-in-pixels/742182>\
**Category:** Questions about Thunkable X\
**Created:** [August 14, 2020, 3:51pm UTC](https://community.thunkable.com/t/screen-size-in-pixels/742182 "2020-08-14T15:51:28Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev\_pro](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dev\_pro](https://community.thunkable.com/u/dev_pro)\
**Post date:** [August 14, 2020, 3:51pm UTC](https://community.thunkable.com/t/screen-size-in-pixels/742182/1 "2020-08-14T15:51:28Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![dami\_flepp](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/dami_flepp/32/72796_2.png) [@dami\_flepp](https://community.thunkable.com/u/dami_flepp)\
**Post date:** [August 14, 2020, 3:52pm UTC](https://community.thunkable.com/t/screen-size-in-pixels/742182/2 "2020-08-14T15:52:59Z")

</div>

Hello  
simply google it?

GG

---

<div class="post-metadata">

**Author:** ![dev\_pro](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dev\_pro](https://community.thunkable.com/u/dev_pro)\
**Post date:** [August 14, 2020, 4:01pm UTC](https://community.thunkable.com/t/screen-size-in-pixels/742182/3 "2020-08-14T16:01:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dami\_flepp](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/dami_flepp/32/72796_2.png) [@dami\_flepp](https://community.thunkable.com/u/dami_flepp)\
**Post date:** [August 14, 2020, 4:25pm UTC](https://community.thunkable.com/t/screen-size-in-pixels/742182/4 "2020-08-14T16:25:51Z")

</div>

in that case i would use % insted

---

<div class="post-metadata">

**Author:** ![dev\_pro](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dev\_pro](https://community.thunkable.com/u/dev_pro)\
**Post date:** [August 14, 2020, 5:00pm UTC](https://community.thunkable.com/t/screen-size-in-pixels/742182/5 "2020-08-14T17:00:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dami\_flepp](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/dami_flepp/32/72796_2.png) [@dami\_flepp](https://community.thunkable.com/u/dami_flepp)\
**Post date:** [August 14, 2020, 5:10pm UTC](https://community.thunkable.com/t/screen-size-in-pixels/742182/6 "2020-08-14T17:10:09Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![dev\_pro](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dev\_pro](https://community.thunkable.com/u/dev_pro)\
**Post date:** [August 14, 2020, 5:41pm UTC](https://community.thunkable.com/t/screen-size-in-pixels/742182/7 "2020-08-14T17:41:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hdawc](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hdawc/32/119068_2.png) [@hdawc](https://community.thunkable.com/u/hdawc)\
**Post date:** [August 14, 2020, 11:06pm UTC](https://community.thunkable.com/t/screen-size-in-pixels/742182/8 "2020-08-14T23:06:26Z")

</div>

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](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/7/27c5c55c0e895de3cf103e6157d388891af420ca.png)

🙂 👍

---

<div class="post-metadata">

**Author:** ![dev\_pro](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dev\_pro](https://community.thunkable.com/u/dev_pro)\
**Post date:** [August 15, 2020, 12:58am UTC](https://community.thunkable.com/t/screen-size-in-pixels/742182/9 "2020-08-15T00:58:09Z")

</div>

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](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/a/ba99275be113136b4d935c818fbd21ab02522687.png)

---

<div class="post-metadata">

**Author:** ![hdawc](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hdawc/32/119068_2.png) [@hdawc](https://community.thunkable.com/u/hdawc)\
**Post date:** [August 17, 2020, 12:19pm UTC](https://community.thunkable.com/t/screen-size-in-pixels/742182/10 "2020-08-17T12:19:55Z")

</div>

No worries, glad to help! 🙂

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:26pm UTC](https://community.thunkable.com/t/screen-size-in-pixels/742182/11 "2024-11-08T12:26:39Z")

</div>


