Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Removing Horizontal Scroll from instances of CL_GUI_TEXTEDIT

mike_mcinerney
Participant
0 Kudos

I modified an example that I saw here on SDN, but I can't seem to remove the horizontal scroll bar.

Any ideas...

Thanks...

...Mike


REPORT  ztextstrindisplay .

DATA gs_desc TYPE string .

PARAMETER p .

DATA : container   TYPE REF TO cl_gui_docking_container ,
       text_editor TYPE REF TO cl_gui_textedit          .

* -----------------------------------------------------------------
AT SELECTION-SCREEN OUTPUT.
  CHECK container IS NOT BOUND.

  CREATE OBJECT container
    EXPORTING
      repid     = sy-repid
      dynnr     = sy-dynnr
      side      = cl_gui_docking_container=>dock_at_bottom
      extension = '200'.

  CREATE OBJECT text_editor
    EXPORTING
      parent        = container
      wordwrap_mode = 1.

  CALL METHOD text_editor->set_textstream
    EXPORTING
      text = gs_desc.

  CALL METHOD text_editor->set_readonly_mode
    EXPORTING
      readonly_mode = 1.

  CALL METHOD text_editor->set_toolbar_mode
    EXPORTING
      toolbar_mode = 0.

  CALL METHOD text_editor->set_readonly_mode
    EXPORTING
      readonly_mode = 1.

* -----------------------------------------------------------------
INITIALIZATION .
  CONCATENATE gs_desc 'This is line 1' cl_abap_char_utilities=>cr_lf INTO gs_desc .
  CONCATENATE gs_desc 'This is line 2' cl_abap_char_utilities=>cr_lf INTO gs_desc .
  CONCATENATE gs_desc 'Third Line    ' cl_abap_char_utilities=>cr_lf INTO gs_desc .
  CONCATENATE gs_desc 'Line Four     ' cl_abap_char_utilities=>cr_lf INTO gs_desc .

1 ACCEPTED SOLUTION

MarcinPciak
Active Contributor
0 Kudos

Hi,

Use this:


  CREATE OBJECT text_editor
    EXPORTING
      parent        = container
      wordwrap_mode = 0.

Regards

Marcin

1 REPLY 1

MarcinPciak
Active Contributor
0 Kudos

Hi,

Use this:


  CREATE OBJECT text_editor
    EXPORTING
      parent        = container
      wordwrap_mode = 0.

Regards

Marcin