当前位置:网站首页>SAP UI5 视图里的 OverflowToolbar 控件
SAP UI5 视图里的 OverflowToolbar 控件
2022-07-05 12:39:00 【汪子熙】
SAP UI5 OverflowToolbar 控件,基于 sap.m.Toolbar,该工具栏在其内容不适合显示区域时提供 Overflow 行为。
当容器可见区域的可用空间不足时,OverflowToolbar的内容会从右向左移动到溢出区域。用户可以通过溢出按钮在弹出窗口中打开它来访问其内容。
下面是一个例子:OverflowToolbar 里的按钮,能够正常显示的情况:

Flag 和 Toggle 按钮无法正常显示,只能在 Overflow 区域显示的情况:
OverflowToolbar是一个自适应容器,它检查可用宽度并隐藏不适合的部分内容。
它的目的是使用简单的控件,如 sap. m.button和 sap.m.label 作为内容。嵌入其他自适应容器控件(sap.m.Breadcrumbs除外)会导致对可用空间的争夺——两个控件都根据另一个控件的大小计算可用空间,并同时改变它们的宽度,导致空间分布的计算不正确。
下图显示了 OverflowToolbar 名为 content 的 aggregation,里面包含了三个子控件:
这三个子控件在 detail 视图里的定义位置:
<m:OverflowToolbar>
<m:ToolbarSpacer/>
<m:Button type="Accept" text="Save"/>
<m:Button type="Reject" text="Cancel"/>
</m:OverflowToolbar>
OverflowToolbar 继承自 sap.m.Toolbar, 这是一种水平容器,最常用于显示按钮、标签、选择和各种其他输入控件。
默认情况下,如果工具栏项有基于百分比的宽度(例如,sap.m.input 和 sap.m.slider)或实现了 sap.ui.core.IShrinkable 界面(例如, sap.m.text 和 sap.m.label),它们是可收缩的。可以通过为工具栏项提供 sap.m.ToolbarLayoutData 来重写此行为。
开发人员可以使用 sap.m.toolbarseparator 在前面和后面的 sap.m.toolbar 元素之间添加一个视觉分隔符。分隔符与主题相关,可以是填充、边距或线。
要在工具栏项之间添加水平空间,请使用sap.m.toolbarspacer。可以定义水平空间的宽度,或者灵活地覆盖工具栏项目之间的剩余空间(例如,将项目推到工具栏的边缘)。
边栏推荐
- RHCSA3
- Cypher syntax of neo4j graph database
- RHCSA7
- Iterator details in list... Interview pits
- 太方便了,钉钉上就可完成代码发布审批啦!
- NLP engineer learning summary and index
- Taobao short videos are automatically released in batches without manual RPA open source
- The relationship between the size change of characteristic graph and various parameters before and after DL convolution operation
- Taobao short video, why the worse the effect
- Common commands and basic operations of Apache Phoenix
猜你喜欢

Super efficient! The secret of swagger Yapi

Alipay transfer system background or API interface to avoid pitfalls

Transactions from January 14 to 19, 2022

Distributed cache architecture - cache avalanche & penetration & hit rate

The relationship between the size change of characteristic graph and various parameters before and after DL convolution operation

Oppo Xiaobu launched Obert, a large pre training model, and promoted to the top of kgclue

Taobao flag insertion remarks | logistics delivery interface

Simply take stock reading notes (3/8)

在家庭智能照明中应用的测距传感芯片4530A

JDBC -- use JDBC connection to operate MySQL database
随机推荐
C language structure is initialized as a function parameter
我在滴滴做开源
Add a new cloud disk to Huawei virtual machine
How can labels/legends be added for all chart types in chart. js (chartjs.org)?
你的下一台电脑何必是电脑,探索不一样的远程操作
Iterator details in list... Interview pits
Taobao flag insertion remarks | logistics delivery interface
谈谈我写作生涯的画图技巧
Halcon 模板匹配实战代码(一)
RHCSA3
SAP 自开发记录用户登录日志等信息
Difference between JUnit theories and parameterized tests
NPM install reports an error
奔跑,开路
Anaconda creates a virtual environment and installs pytorch
前几年外包干了四年,秋招感觉人生就这样了..
Transactions from January 14 to 19, 2022
UNIX socket advanced learning diary -ipv4-ipv6 interoperability
【Nacos云原生】阅读源码第一步,本地启动Nacos
RHCAS6