cancel
Showing results for 
Search instead for 
Did you mean: 

sap.m.scrollcontainer size

dirk_wieczorek
Participant
0 Kudos

I have a sap.m.page with the following content:

Header with sap.m.bar ( contains title / and other informationes )

beneath it a sap.m.panel with customer informations / expandable

then an icontabbar with some filters.

Under the iconttabbar i have a scrollcontainer with an sap.m.table.

The problem is the size of the sap.m.scrollcontainer.

Under the scrollcontainer is footer with a sap.m.bar.

If i give it the wrong size i dont get a scrollbar and the requirement is to adjust the size of the scrollcontainer depending on if the panel is expanded

or not.

So the problem is to determine the place between the iconttabbar and the footer.

I know there is   sap.ui.Device.resize.height  to get the available height for the sap.m.page.

But i dont know how to get the size of the different controls.

Is there any way to calculate this?

Or is there another way to determine right size for scrollcontainer?

Regards

Dirk

Accepted Solutions (1)

Accepted Solutions (1)

former_member182862
Active Contributor
0 Kudos

Hi Dirk

here is how to get height of controls.

Does it help?

JS Bin - Collaborative JavaScript Debugging

Answers (1)

Answers (1)

vijay_kumar49
Active Contributor
0 Kudos

below is the way of representing the xml code of the "ScrollContainer",

  1. <core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" 
  2.   controllerName="container.Sample" xmlns:html="http://www.w3.org/1999/xhtml"> 
  3.   <Page title="Title"> 
  4.   <content> 
  5.   <ScrollContainer 
  6.   id="scrollcontainer" height="100%" content="{/results}"> 
  7.   <Page tite=" Your template "></Page> 
  8.   </ScrollContainer> 
  9.   </content> 
  10.   </Page> 
  11. </core:View> 

Hope this code helps,

daniele17277
Explorer
0 Kudos

Pointless.
If the Scrollcontainer is the only element of the page, you don't need a scrollcontainer, the page already scrolls.
The real point is how to set the height of the scrollcontainer as the remaining vertical space of the page