Show TOC Start of Content Area

Object documentation TextView This graphic is explained in the accompanying text  Locate the document in its SAP Library structure

Definition

The TextView UI element provides an area for displaying a multiline text.

You can assign a popup menu to a TextView which is visible when the user places the cursor on the TextView: This graphic is explained in the accompanying text 

Use

When using a TextView element, you should always add a label to ensure accessibility of an application.

Description of UI Element Properties

      design

Describes the look of the TextView element. The Cascading Style Sheet (CSS) provided by SAP describes the variations of the design attribute display. The design property can be filled with the following values and is represented by the enumeration type WDTextViewDesign.

emphasized

Highlights the text and applies the standard font size.

groupTitle

deprecated. Use SectionHeader instead to define a header of a TransparentContainer.

header 1

Highlights the text and applies the standard font size +4.

header 2

Highlights the text and applies the standard font size +2.

header 3

Highlights the text and applies the standard font size.

header 4

Highlights the text and applies the standard font size –1 (small) -> (like the legend value, but highlighted).

label
 

deprecated. Use Label instead.

label_small

deprecated. Use Label instead.

legend

Displays the text using the standard font size –1.

monospace

Displays the text using a non-proportional font size. Each letter takes up the same space.

reference

Displays the text in italics and applies the standard font size.

standard

Displays the text using the standard font size. No text attributes are defined for this value.

      hAlign

Specifies the horizontal alignment of the content within the TextView element. The value native for the layout property is ignored. The hAlign property can take the following values and is represented by the list type WDInputFieldAlignment:

auto

Automatic alignment of the text content. The alignment is specified by the usage of the UI element - for example, by the data type of the value to be represented.

beginOfLine

The text content is always displayed at the beginning of line. Therefore, the text content for the value ltr of the textDirection property is left-justified. The text content for the value rtl is right-justified.

center

Centered alignment.

endOfLine

The text content is always displayed at the end of the line. Therefore, the text content for the value ltr of the textDirection property is right-justified. The text content for the value rtl is left-justified.

forcedLeft

The text content is always left-justified, regardless of whether the value is ltr or rtl for the textDirection property.

forcedRight

The text content is always right-justified, regardless of whether the value is ltr or rtl for the textDirection property.

left

Left-justified alignment. This value is deprecated. Use beginOfLine instead.

right

Right-justified alignment. This value is deprecated. Use forcedRight instead.

The default value for this property is auto.

      layout

Describes the alignment of the text. The layout property can be filled with the following values and is represented by the enumeration type WDTextViewLayout.

block

Displays the TextView element in a <div> tag.

native

Displays the TextView element in a <span> tag.

paragraph

Displays the TextView element in a <p> tag.

      text

Describes the text to be displayed.

      semanticColor

critical

Displays the TextView element with a color that indicates a critical state - for example, orange.

diminished

Displays the TextView element with a color that indicates a diminished state. 

marked1

Displays the TextView element with a color whose meaning can be defined by the user.

marked2

Displays the TextView element with a second color whose meaning can be defined by the user.

negative

Displays the TextView element with a color that indicates a negative state - for example, red.

positive

Displays the TextView element with a color that indicates a positive state - for example, green.

standard

Displays the TextView element with a default color.

      textDirection

Specifies the text direction and allows you to use input fields for texts in languages which require a specific text direction. The textDirection property can be filled with the following values and is represented by the enumeration type WDTextDirection.

inherit

The text direction is inherited from the parent element. Therefore, the text direction is identical to the one of the parent element.

ltr

The text runs from left to right.

rtl

The text runs from right to left.

The default value for this property is inherit.

      width

Specifies the width of the TextView UI element that you can specify in CSS sizes, such as em, ex, pixels or percentage values.

      wrapping

Specifies whether or not text can be wrapped to the next line.

Properties Overview

Name

Interface

Type

Initial Value

Bindable

design

IWDTextView

WDTextViewDesign

standard

bindable

enabled

IWDUIElement

boolean

true

bindable

hAlign

IWDTextView

WDInputFieldAlignment

auto

bindable

layout

IWDTextView

WDTextViewLayout

native

bindable

semanticColor

IWDTextView

WDTextViewSemanticColor

standard

bindable

text

IWDTextView

String (TranslatableText)

 

bindable

textDirection

IWDTextView

WDTextDirection

inherit

bindable

tooltip

IWDUIElement

String (TranslatableText)

 

bindable

visible

IWDUIElement

WDVisibility

visible

bindable

width

IWDTextView

String

 

bindable

wrapping

IWDTextView

boolean

false

bindable

Note

The enabled property is ignored and does not affect the browser.

 

End of Content Area