justinmind-logo
 
Upvote 1

How to adapt a dynamic panel height to the browser height ?

Solved Jonathan Serex 3 years ago

Hello !

I would need your help on how to reproduce in my prototype a behavior that we have in our real application.

In our application we have the "page content area" (see screenshot 3). The height of this area adapts dynamically to the browser height. I could not figure out how to reproduce this in Justinmind.

Here is what I've tried:

- I created a dynamic panel for the "page content area". It is pinned to the top with a Y margin of 130px so that it starts after page header section. (see screenshot 0).

- If I give to this dynamic panel a height of 83%, so that it fits (approximatively) with the screen's height, then, during the simulation, the page content area is too short and does not take the full browser's height. (see screenshot 1)

- If I give to this dynamic panel a height of 100%, then, during the simulation, the page content area is too big, and the bottom of the scroll bar is not even visible. (see screenshot 2)

- The screenshot 3 shows the result I am looking for. To make it work in the simulation, I had to set a fix height to the dynamical panel, corresponding exactly to the height available in the browser when displayed in full screen. Of course this is not what I want either, because as soon as I resize the browser's height, the page content area, and its scroll bar, do not adapt to the new height.

Can I ask for your support on how to achieve this ? Unfortunately I could not find the solution in your documentation (maybe I missed it ?)

Thanks in advance for your help.

p.s

I can provide the original .vp file if it helps

Best Answer
photo

You can define the height as a calculated expression and use the constant 'window height' to calculate what height you want the dynamic panel to have.

Replies (1)
photo
1

Hello,

Thank you for reaching out! Which version of Justinmind are you currently using for this prototype that you are working with?

Thank you kindly,

-Chloe

photo
1

Hello Chloe,

This is the v8.7.9

photo
1

Hello,

If you could attach your .vp file that would be very helpful. I will take a look and see what kind of solution I can find.

Thank you kindly,

-Chloe

photo
1

Hello,

I sent you the file by email on jim.development@justinmind.com as I get an error message when I try to upload the .vp file. (incorrect file type) :-(

photo
1

Hello,

Thank you for sending it, we have received your prototype and are taking a look at it.

Thank you kindly,

-Chloe

photo
1

Hello Chloe,

Have you identified a solution for this problematic ? How can we simulate this correctly ?

Thanks in advance for your support on this ticket.

photo
1

Hello,

Any news on this topic ? I remain very interested to a solution on how to prototype this correctly.

Thanks for your support.

photo
1

You can define the height as a calculated expression and use the constant 'window height' to calculate what height you want the dynamic panel to have.

photo
1

Amazing !!

I had to discover that an even "on windows resize" exists, and it works !

Thank you so much Victor ! You made my day ! :-)

photo
1

I'm glad it worked out!

photo
Leave a Comment
 
Attach a file