on 2021 May 13 2:48 PM
Hi,
I have the next Dialog in UI5:
but as you can see it dont shows the entire title, so I want to do a break line in order to show the title in 2 lines and don't have to make widther the dialog. Is it possible?
here is my code for the Dialog:
oDialog = new Dialog({
title: "Are you sure you want to delete "+var1+" from the .... "+
var2+"?" });
The sap.m.Dialog control uses internally a sap.m.Title to display the title. Although sap.m.Title does provide a wrapping property, this cannot be used by default with the sap.m.Dialog control, because the Title control is not accessible (at least not in a "legal" way, without breaking the interface contracts).
But you can set a customHeader for your dialog, e.g. like following:
const dialog = new Dialog();
const bar = new Toolbar();
const title = new Title({ text: "This is my crazy long text which does not fit on one line", wrapping: true });
bar.addContent(title);
dialog.setCustomHeader(bar);
With that you set a customer header which is a toolbar including a title control enabled for wrapping.
It looks like following then (can be optimized by e.g. the wrappingType available on the title control):
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
11 | |
10 | |
10 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.