UI5-Text View
The post shows how to create and set different properties of Text View.
Put below code in between the start and end of second script tag
// Instantiate a new text view
oTextField = new sap.ui.commons.TextView({
text: "Hello Text View",
tooltip: "This is Text View help tooltip",
}).placeAt("content");
Put below code in between the start and end of second script tag
// Instantiate a new text view
oTextField = new sap.ui.commons.TextView({
text: "Hello i am a long text enough which depends upon wrapping property to display ful or not",
tooltip: "This is Text View help tooltip",
wrapping: false,
}).placeAt("content");
Compressing the screen size, as the wrapping is false, few parts nor visible.
Put below code in between the start and end of second script tag
<script>
// Instantiate a new text view
oTextField = new sap.ui.commons.TextView({
text: "Hello i am a long text enough which depends upon wrapping property to display ful or not",
tooltip: "This is Text View help tooltip",
wrapping: true,
}).placeAt("content");
Compressing the screen size, the wrapping works fine.
Text color can be set.
Put below code in between the start and end of second script tag
// Instantiate a new text view
oTextField = new sap.ui.commons.TextView({
text: "Hello i am a long text enough which depends upon wrapping property to display ful or not",
tooltip: "This is Text View help tooltip",
wrapping: true,
semanticColor: sap.ui.commons.TextViewColor.Negative,
//semanticColor: sap.ui.commons.TextViewColor.Positive,
}).placeAt("content");
Put below code in between the start and end of second script tag
// Instantiate a new text view
oTextField = new sap.ui.commons.TextView({
text: "Hello i am a long text enough which depends upon wrapping property to display ful or not",
tooltip: "This is Text View help tooltip",
wrapping: true,
// semanticColor: sap.ui.commons.TextViewColor.Negative,
semanticColor: sap.ui.commons.TextViewColor.Positive,
design: sap.ui.commons.TextViewDesign.H1,
}).placeAt("content");