Computed width and height for screen

i opened an old project and found errors about computed width and height for screen. Why have they been removed??

i want them back!! :smiley:

:frowning: i had to add some code to most of my apps to get rid of the missing computedwidth and height

The Device screen width/height block will accomplish the same things.

I’m ot sure why they were removed.

hi @eddie.rebehy
yes screen width and height they work. If you put a container into another and you set the 50% of its width then you dont know how much big is… so computed width was a must!

On my android and iOs the container read prop (width or height ) dont work

1 Like

Hi @sirfrancisdrake,

I have been playing around with animation to open and close accordion style sections in a continuously scrolling page with speed controlled animation on a button press to each section and showing a vertical or horizontal arrow image inside each button. The way I am doing this is by including a button to fill the desired collapsible container 1pix wide with transparent attributes so that it is invisible. The button will mimic the container height which is set to fit contents. I am then using the button calculated height block to store the value of the expanded container into a variable and using a loop referencing the variable and incrementing container size until fully opened or closed. I can do this for vertical or horizontal manipulation and the results are aesthetically impressive.

In essence what I am saying is you can include a transparent but integrated button that takes up no interfering real-estate of the container to get height/width of the container.

I thought of you and wondered if you can use this method in your application instead of the get screen height/width block that has now disappeared?

cheers.

hi @eddie.rebehy,
i think there was a misunderstanding !!. The screen.width and height works perfectly. In the new container list of blocks there is no “computed width and height” :frowning: . These blocks were usefull to calculate runtime the width and height of the container you set as “fit” or “fill” in the design. In a couple of my app i used them and i had to find a workaround very similar to what you explained… thank a lot anyway!!