2017-10-05 24 views
0

我有一個SAPUI5主/細節應用程序。Master/Detail + ObjectHeader + IconTabBar:如何滾動IconTab內容?

詳細信息頁面由一個ObjectHeader和一個帶有多個Tabs的IconTabBar組成。

我特別希望IconTabBar始終可見,並且只能在IconTab內容上滾動。我如何做到最好?

問候,

+0

你的意思是一樣的[圖標資源管理器](https://openui5.hana.ondemand.com/test-resources/sap/m/demokit/iconExplorer/webapp/index.html)?或者你怎麼看待使用[sap.uxap.ObjectPageLayout](https://openui5.hana.ondemand.com/#/sample/sap.uxap.sample.ObjectPageHeaderExpanded/preview)和固定頭部? – boghyon

+0

嗨,謝謝你的回覆 我想要IconTabBar,它位於Object header 之下,並且iconTabBar的內容有一個滾動條 –

+0

請看這個回答:https://stackoverflow.com/a/47750244/5846045。您基本上需要在IconTabBar中添加屬性'stretchHeightContent'以僅製作ScrollContainer滾動條。 – boghyon

回答

0

圖標標籤欄的內容可見:請儘量到expanded財產trueexpandable屬性設置爲sap.m.IconTabBarfalse

圖標標籤欄滾動:請儘量使用sap.m.ScrollContainersap.m.IconTabFilter內部和enableScrolling屬性設置爲sap.m.Pagefalse

<mvc:View 
    xmlns:mvc="sap.ui.core.mvc" 
    xmlns="sap.m"> 
    <App> 
    <Page 
     enableScrolling="false"> 
     <content> 
     <IconTabBar 
      expanded="true" 
      expandable="false"> 
      <items> 
      <IconTabFilter 
       text="foobar"> 
       <ScrollContainer 
       height="100%" 
       width="100%" 
       horizontal="true" 
       vertical="true" 
       focusable="true"> 

       <!-- content to scroll --> 

       </ScrollContainer> 
      </IconTabFilter> 
      </items> 
     </IconTabBar> 
     </content> 
    </Page> 
    </App> 
</mvc:View>