cancel
Showing results for 
Search instead for 
Did you mean: 

Realtive Siez of ScrollContainer

Former Member
0 Kudos

Hi,

we try to use a ScrollContainer to hold a Message Area. The "ScrollContainer" is located within an "TransparentContainer" and keeps itself a "ViewConatainerElement".

In the properties of the ScrollContainer we set "LayoutData.height" and "ElementProperties.height" each to 100%. ScrollingMode is set to "auto", layout is "MatrixLayout".

If we start the application our container seems to colapse to zero height. The ScrollCounter is only visible, if we set "LayoutData.height" to a fixed "px" value! But this is not what we need.

Is there any way to set the size of a ScrollContainer completely with relative (percent) values?

Accepted Solutions (0)

Answers (1)

Answers (1)

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hallo Richard,

setting the width-property to 100% is not applicable in most cases. 100% relative to what? Relative sizes must refer to an absolute size somewhere else. To be exact the complete UI-Element-container hierarchy above a certain element with a relative size must have "computable" sizes. This means the client must be able to compute the absolute size somehow. For this purpose he tries to refer to an absolute root-size like the browser width for the width property. For determining this root-size he traverses the container-hierarchy from one hierarchy level to the next higher one. Because the UI-element renderers may also render "invisible" containers in between your defined "visible" containers this series of size values may be "broken" somewhere. In this case you won't see the desired result. Furthermore these sizing algorithm may differ from one browser (client) to another.

Consequently you should try to avoid relative sizes as much as possible. Instead you should apply absolute width and height values or size values using the em or ex measure.

Could you please specify more in detail how your custom MessageArea should look like? Why do you need a ScrollContainer?

Regards, Bertram

Former Member
0 Kudos

Hi Bertram,

thanks for your answer. Meanwhile we stopped the development of that feature with the scrollcontainers. As you wrote, we also found, that we need something "absolute", to be relative to If we set <b>one</b> UI-Element to absolut px values for the height, the scrollcontainer works fine.

But unfortunately we are not able to keep this values absolut, because with that, we run in other problems. Also the window, we talk about, is a complicated conglomerate of referenced DCs, so we decided not to continue with that feature.

Thanks for your answer

Richard