当前位置:网站首页>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。可以定义水平空间的宽度,或者灵活地覆盖工具栏项目之间的剩余空间(例如,将项目推到工具栏的边缘)。
边栏推荐
- 上午面了个腾讯拿 38K 出来的,让我见识到了基础的天花
- Add a new cloud disk to Huawei virtual machine
- RHCAS6
- Halcon 模板匹配实战代码(一)
- Rasa Chat Robot Tutorial (translation) (1)
- Pytoch through datasets Imagefolder loads datasets directly from files
- A few years ago, I outsourced for four years. Qiu Zhao felt that life was like this
- What if wechat is mistakenly sealed? Explain the underlying logic of wechat seal in detail
- Sqoop import and export operation
- jxl笔记
猜你喜欢
Compilation principle reading notes (1/12)
Taobao short video, why the worse the effect
Super efficient! The secret of swagger Yapi
CVPR 2022 | single step 3D target recognizer based on sparse transformer
SAP 自开发记录用户登录日志等信息
From the perspective of technology and risk control, it is analyzed that wechat Alipay restricts the remote collection of personal collection code
Oppo Xiaobu launched Obert, a large pre training model, and promoted to the top of kgclue
ActiveMQ installation and deployment simple configuration (personal test)
Add a new cloud disk to Huawei virtual machine
Taobao order interface | order flag remarks, may be the most stable and easy-to-use interface
随机推荐
Difference between JUnit theories and parameterized tests
【云原生】Nacos-TaskManager 任务管理的使用
Compilation principle reading notes (1/12)
Taobao product details API | get baby SKU, main map, evaluation and other API interfaces
Distributed solution - completely solve website cross domain requests
Research: data security tools cannot resist blackmail software in 60% of cases
Taobao, pinduoduo, jd.com, Doudian order & Flag insertion remarks API solution
From the perspective of technology and risk control, it is analyzed that wechat Alipay restricts the remote collection of personal collection code
How can labels/legends be added for all chart types in chart. js (chartjs.org)?
RHCAS6
Simply take stock reading notes (1/8)
A possible investment strategy and a possible fuzzy fast stock valuation method
GNN(pytorch-geometric)
What if wechat is mistakenly sealed? Explain the underlying logic of wechat seal in detail
【云原生】Nacos中的事件发布与订阅--观察者模式
ActiveMQ installation and deployment simple configuration (personal test)
CVPR 2022 | single step 3D target recognizer based on sparse transformer
Get the variable address of structure member in C language
NFT: how to make money with unique assets?
开发者,云原生数据库是未来吗?