UI5-Text View

lightUI5-Text View

 

 


The post shows how to create and set different properties of Text View.

1


 

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");


2


3

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");


 

 

4


Compressing the screen size, as the wrapping is false, few parts nor visible.

5


6


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");


7


Compressing the screen size, the wrapping works fine.

8


Text color can be set.

9


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");


10


 

11


12


13


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");


14


 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s