Show TOC Start of Content Area

Object documentation TextView API  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

Highlights the text and applies the standard font size.

This value is set if the TextView element is used as the title of a container that is not a layout container (property isLayoutContainer false). The value of the accessibilityDescription property of the container must contain the same information as the TextView element. In this case, when accessibility mode is active, the TextView will not be read and be removed from the tab sequence.

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 hAlignproperty 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.

     wrapping

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

Overview of Inherited and Additional Properties

Name

Interface

Type

Initial Value

Bindable

Value Required

design

IWDTextView

WDTextViewDesign

standard

bindable

No

enabled

IWDUIElement

boolean

true

bindable

No

hAlign

IWDTextView

WDInputFieldAlignment

auto

bindable

No

layout

IWDTextView

WDTextViewLayout

native

bindable

No

semanticColor

IWDTextView

WDTextViewSemanticColor

standard

bindable

No

text

IWDTextView

String (TranslatableText)

 

bindable

No

textDirection

IWDTextView

WDTextDirection

inherit

bindable

No

tooltip

IWDUIElement

String (TranslatableText)

 

bindable

No

visible

IWDUIElement

WDVisibility

visible

bindable

No

wrapping

IWDTextView

boolean

false

bindable

No

Note

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

 

End of Content Area