Show TOC

TextEdit PropertiesLocate this document in the navigation structure

Expand the properties to display further details.

id

The ID is a unique identification.

activateAccessKey

Activates access keys. Both users and administrators can personalize this property.

adjustRowsToText

If property displayAsText is set, with adjustRowsToText the display of TextEdits is restricted to the text rows that actually exist.

cols

Width of the TextEdit UI element as the number of characters. Note that the cols property can be overridden by the width property. This property can be personalized by administrators.

contextMenuBehaviour

Assignment of the context menu Note that the context menu can be overwritten in the hook method WDDOONCONTEXTMENU in all cases.

Value

Description

inherit

The UI element inherits the static context menu from its parent UI elements.

provide

The UI element context menu is the one which was specified by the contextMenuID.

suppress

No static context menu is created.

contextMenuId

ID for the context menu you have defined. You assign this ID to a UI element if the element itself and all the subelements below it are to get this context menu. For example, if you have defined a contextMenuId for a table, the context menu applies to the whole table and to all subelements.

design

Display of the TextEdit element. This property can be personalized by administrators.

Value

Description

Can be Set Using Personalization

monospace

Text is displayed in non-proportional font type. Each letter takes up the same space.

Yes

standard

Text is displayed in default font size (former mode).

Yes

displayAsText

Specifies whether (ToolBar)InputField is to look like a pure Textfeld when the focus is not set on it. When the mouse pointer is moved over the UI element, the UI element is highlighted. When the UI element is clicked on, it behaves like a normal (ToolBar)InputField, and the user can enter data.

displayOnly
  • Specifies whether the user can edit the UI element or only display it.

    This property has almost the same function as readOnly. The differences are that the background of UI elements is white instead of gray, and any required asterisk is no longer displayed on the label after activation.

    The following figure shows this difference, using the RadioButton UI element as an example:

    This property can be personalized by administrators. In personalization, this property can be assigned the value: true

Caution

If you use displayOnly with the following UI elements, not all properties are supported.

The supported properties are listed below:

  • displayOnly for the UI element InputField:

    If you use displayOnly for the UI element InputField, only the following properties are supported:

  • displayOnly for the UI element DropDownByIndex or DropDownByIndex:

    If you use displayOnly for UI elements DropDownByIndex and DropDownByIndex, only the following properties are supported:

Note
  • If both displayOnly = trueand readOnly = true are used, the UI element is displayed in displayOnly- style.

  • A TextView is rendered for UI elements InputField, DropDownByKey, DropDownByIndex, and DropDownListBox if displayOnly = true.

  • Property displayOnly does not function in ToolBar elements.

  • IfdisplayOnly = true is set for UI elements DropDownByIndex, DropDownByKey, DropDownListBox, and InputField, multiple neighboring blank characters may be compressed to one single blank character when you run the application in Internet Explorer. The problem occurs in quirks mode with all IE versions and in standard mode with IE8 and smaller.

enabled

Specifies whether or not an event can be triggered by a user interaction. If the value is TRUE, the view elements positioned above it are used at runtime to determine the value. This means that if the surrounding container is not enabled, all the containers within this are also not enabled.

explanation

Help text displayed when the help mode is activated. This property can be personalized by administrators. More information: Explanation Property

The explanation property is only displayed if a Label exists for the corresponding UI element.

Note the following exception:

The explanation property of an AbstractTableColumn is always displayed. If the UI element appears in aTable, and therefore has no Label, then use a AbstractTableColumn.explanation as a replacement for an explanation for the respective UI element (for example InputField).

height

Height of the UI element; see also Methods and Properties of UI Elements. Note that this property overrides the rows property. This property can be personalized by administrators.

heightMode

Specifies whether the height of the element can be changed. If you click on the textEdit UI element, a bar appears in the bottom area and you can use it to change the height.

Value Visualization Description
default The height cannot be changed. But if it is inserted in a CTable, the height can be changed.
resizable The height can be changed.
imeMode

Control of the frontend IMS mode. IME (Input Method Editor) is a basic component for writing Chinese, Japanese, and Korean characters. This system of writing has more characters than could be keyed in using a normal (restricted) keyboard. IME enables users to key in and edit Chinese, Japanese, and Korean characters using a normal (restricted) keyboard.

Value

Description

active IME mode is active but can be deactivated
active IME mode setting is disregarded
disabled IME mode is inactive but cannot be activated
inactive IME mode is inactive but can be activated
readOnly

Determines whether the input field can be edited or read only. This property can be personalized by administrators. In personalization, this property can be assigned the value: true

rows

Height of the TextEdit UI element as a number of lines. Note that this property can be overridden by the height property. This property can be personalized by administrators.

state

Input status of the UI element. Read the note about the required asterisk for a Label in FormLayout under TTruncating Contents in the FormLayout. This property can be personalized by administrators.

Value Visualization Description Can be Set Using Personalization
normal

TextEdit.state = normal

Normal status of the interface element

No

required

TextEdit.state = required

The value must be entered

Yes

styleClassName

With this property you can create your own style definitions to change the appearance of UI elements (for example, the font color of buttons). With interface IF_WD_CUSTOM_STYLE_MANAGER (method CREATE_CUSTOM_STYLE) you can create your own style classes. You define the various style definitions for a style class within objects of interface type IF_WD_CUSTOM_STYLE in the form of a name/value list. You can then assign these style definitions to specific UI elements. The value of parameter STYLE_CLASS_NAME of method CREATE_CUSTOM_STYLE must be the same as the value of property styleClassName of the UI element. This property can be personalized by administrators.

Note

This feature is only available in HTML standards mode. For more information, see UI Control Rendering in Standards Mode, and 1753544 Information published on SAP site.

Note that setting a style is not always visible. Other properties can dominate and overwrite these. This can have an impact on the present style or on changes made in the future.

Example
A style definition is created and added to the application in the following example. The style definition ensures that the text for buttons that use this style definition is displayed in red:
data l_style_manager  type ref to if_wd_custom_style_manager.
data l_style          type ref to if_wd_custom_style.

" Get the custom style manager
l_style_manager =
  wd_comp_controller->wd_get_api( )->get_application( )->get_custom_style_manager( ).

" Create a new custom style with name myButtonStyle for BUTTON elements
l_style =
  l_style_manager->create_custom_style( style_class_name = `myButtonStyle`
                                           element_type     = 'BUTTON' ).
" Set font color to red
l_style->add_style_property( name  = `fontColor`
                               value = `red` ).
" Add custom style
l_style_manager->add_custom_style( l_style ).

To assign the style definition to a button, set the button property styleClassName to the value myButtonStyle.

You can find an application example in the system in component WDR_TEST_CUSTOM_STYLES.

For more information, see the system documentation for the following interfaces:
  • IF_WD_CUSTOM_STYLE
  • IF_WD_CUSTOM_STYLE_MANAGER
textDirection

Text or writing direction. This enables labels of interface elements to be read in languages that have an RTL writing direction, such as Arabic or Hebrew, as opposed to LTR for languages like English. This property can be personalized by administrators.

Value

Description

Can be Set Using Personalization

INHERIT

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

yes

LTR

Left to right text direction

yes

RTL

Right to left text direction

yes

value

Text to be displayed. The text can be edited. The attribute to be bound can be of type STRING or STRING_TABLE. With STRING_TABLE rows from TextEdit are stored as table rows. A line break is always stored as a line feed in the string (CL_ABAP_CHAR_UTILITIES=>NEWLINE, ASCII decimal 10). The Web Dynpro framework carries out the conversion for the client platform. Both users and administrators can personalize this Primary Property. You can also predefine values; refer to Methods and Properties of UI Elements.

visible

Visibility of the interface element. Both users and administrators can personalize this property.

Values Description Can be Set Using Personalization

NONE

The UI element is not visible on the screen and takes up no space.

Yes

VISIBLE

The UI element is displayed on the screen.

No

width

Width of the UI element. This property can be personalized by administrators. More information: Methods and Properties - General Information.

wrapping

Specifies whether or not the texts can be wrapped to the next line. This property can be personalized by administrators.

Value

Visualization

Description

Can be Set Using Personalization

off

TextEdit.wrapping = off

The text is not wrapped. If the text row length exceeds the width specified by property cols, a horizontal scroll bar is displayed.

Yes

hard

TextEdit.wrapping = hard

Wraps the text if the value specified by property cols is reached. A carriage return is inserted for each wrapping. A horizontal scroll bar is not displayed for this value. Note that this feature is not supported in the browser.

Yes

soft

TextEdit.wrapping = soft

Wraps the text if the value specified by attribute cols is reached. A carriage return is not inserted for each wrapping.

Yes