Skip to content

Latest commit

 

History

History
143 lines (85 loc) · 3.2 KB

Text_f94deb4.md

File metadata and controls

143 lines (85 loc) · 3.2 KB
loio
f94deb45de184a3a87850b75d610d9c0

Text

The sap.m.Text control allows you to display longer texts in your app, with the possibility to manage the number of lines, the text wrapping, and the visualization of line breaks and spacing.


You can influence the maximum number of visible lines by setting the maxLines property to a numerical value. This option is only available when the wrapping property is set to true. For more information, see the sap.m.Text - Max Lines Sample.


The Text control supports the rendering of new lines and the preservation of whitespace and tabs. Depending on whether you are using JavaScript or XML, or data binding, you need to consider specific aspects related to the definition of new lines and tabs.

sap.m.Text: New lines and tabs definition in the different use cases

To visualize

JavaScript/Data binding defined string

XML View defined string

New line

\n




\n

For example, if you want to visualize C:\NewFolder

\\n

\n

Tab

\t

	

\t

For example, if you want to visualize C:\TestFolder

\\t

\t

For more information, see the API Reference and the sap.m.Text - Render Whitespace Sample.


Restriction:

When you use wrapping, bear in mind that the multi-line overflow indicator depends on whether the browser supports line clamping. If the browser supports it, it shows the overflow as an ellipsis; if not, the overflow indicator is not displayed.