on 02-03-2006 2:53 PM - last edited on 02-04-2024 2:02 AM by postmig_api_4
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
61 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.