Start of Content Area

Background documentation Toggle Button Locate the document in its SAP Library structure

The UI element ToggleButton represents the pushbutton on the screen. The user can execute statements and actions by clicking the ToggleButton.

Note

To enable the development of Structure linkaccessible applications, the tooltip property is checked during the syntax check if the property text is not set.

Example of the Display

This graphic is explained in the accompanying text

 

Runtime Class

CL_WD_TOGGLE_BUTTON

 

Properties in the View Designer

Name

Type

Initial Value

Bindable

id

STRING

(automatic)

No

Structure linkchecked

WDY_BOOLEAN

False

Mandatory

Structure linkcheckedImageSource

STRING

 

Yes

Structure linkdesign

WDUI_TOGGLE_BUTTON_DESIGN

standard

Yes

Structure linkenabled

WDY_BOOLEAN

True

Yes

Structure linkimageFirst

WDY_BOOLEAN

True

Yes

Structure linkimageSource

STRING

 

Yes

Structure linktext

Text

 

Yes

Structure linktextDirection

WDUI_TEXT_DIRECTION

inherit

Yes

Structure linktooltip

Text

 

Yes

Structure linkvisible

WDUI_VISIBILITY

visible

Yes

Structure linkwidth

STRING

 

Yes

 

Events in View Designer

Name

Structure linkonToggle

Note

Other properties that can be inherited are defined in the associated higher-level class.  The associated interface elements are:

      Structure linkAbstractToggleButton

      Structure linkAbstractToggle

      Structure linkUIElement

      Structure linkViewElement

Dynamic Programming

For dynamic programming, the same properties, events, and aggregations are available as in View Designer. Bear in mind the different spellings.

Dynamic Programming of Properties

View Designer Name

Runtime Name

Type

Structure linkchecked

CHECKED

WDY_BOOLEAN

Structure linkcheckedImageSource

CHECKED_IMAGE_SOURCE

STRING

Structure linkdesign

DESIGN

WDUI_TOGGLE_BUTTON_DESIGN

 design: standard

CL_WD_TOGGLE_BUTTON=>E_DESIGN-STANDARD

 design: toggle

CL_WD_TOGGLE_BUTTON=>E_DESIGN-TOGGLE

Structure linkenabled

ENABLED

WDY_BOOLEAN

Structure linkimageFirst

IMAGE_FIRST

WDY_BOOLEAN

Structure linkimageSource

IMAGE_SOURCE

STRING

Structure linktext

TEXT

WDY_MD_TRANSLATABLE_TEXT

Structure linktextDirection

TEXT_DIRECTION

WDUI_TEXT_DIRECTION

 textDirection: inherit

CL_WD_TOGGLE_BUTTON=>E_TEXT_DIRECTION-INHERIT

 textDirection: ltr

CL_WD_TOGGLE_BUTTON=>E_TEXT_DIRECTION-LTR

 textDirection: rtl

CL_WD_TOGGLE_BUTTON=>E_TEXT_DIRECTION-RTL

Structure linktooltip

TOOLTIP

WDY_MD_TRANSLATABLE_TEXT

Structure linkvisible

VISIBLE

WDUI_VISIBILITY

 visible: none

CL_WD_TOGGLE_BUTTON=>E_VISIBLE-NONE

 visible: visible

CL_WD_TOGGLE_BUTTON=>E_VISIBLE-VISIBLE

Structure linkwidth

WIDTH

STRING

 

Dynamic Programming of Events

View Designer Name

Runtime Name

Structure linkonToggle

ON_TOGGLE

Example

You can find examples in the system in the Web Dynpro application, WDR_TEST_UI_ELEMENTS.

 

 

End of Content Area