Skip to Content

Removing Horizontal Scroll from instances of CL_GUI_TEXTEDIT

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 .

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Dec 19, 2008 at 03:59 PM

    Hi,

    Use this:

      CREATE OBJECT text_editor
        EXPORTING
          parent        = container
          wordwrap_mode = 0.
    

    Regards

    Marcin

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.