Design & Runtime screen output different


Danny Cheah

Hi David,

I have the following problem and I don't know how to resolve it even though I followed the sample FixedContainer. 

Design Layout

The above design, where the logo is, I have a fixed container and and image object is in the container as I want it to be on the top all the time. 

The second part, I have another container with a HTML object in it. 

The third part, I have a push button. 

When I execute, I have the following output and where the logo is, it did not stick to the top and the second container overflow to cover my Push button. 

What have I done not correct. Please help. 


Thank you.
Best regards,
Danny Cheah

DecSoft

Hello Danny,

I think to know what you wanted, so I will try to help you. The "FixedContainer" is intented to shown how we can place content beyond the app view height. That content is perfectly "scrollable" at runtime. But this sample can't do for you what you wanted. Please, let me to explain.

First of all, maybe you no need any container at all: containers are good to group other controls, in order to set a specific background for the container, so the container controls stay inside that background color, somethings like that.

But you can place the header Image control that you wanted without any Container control, and, also without a Container, below the Image you can place your HTML control. So what is the trick? The trick is the CSS "overflow-y" of the HTML Control.

Setting the "overflow-y" CSS to "auto", for example, the contents of the HTML control stay in the control, and, never go beyond the control (and never hide or mess with the Push button), because the appropriate scrollbar appear to allows to show the content of the HTML control.

So in principle you only need three controls: the Image, the HTML content and the Push button. The image can be may also put inside the HTML content control (using an IMG HTML tag), so you can have only the HTML content and the Push button controls.

Take a look at the below app (copy the XML and save it in a file like "MyApp.ab". Open this with AB and run the app.



Danny Cheah
Thanks David. I managed to get it done as per your suggestions.
Thank you.
Best regards,
Danny Cheah

DecSoft

You're welcome, Danny! :-)


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.