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: 

Problems with Textedit control.

Former Member
0 Kudos

Hello all!

In my program I`m trying to show Textedit control on one of a program screens. I create a docking container (cl_gui_docking_container) and then Texedit control (cl_gui_textedit). If I call screen using "call screen screen_number" Textedit control appears, but if I try to call screen using "call screen screen_name starting at..." the screen appears but the Textedit control doesn`t.

Is it possible to resolve this problem?

Thanks in advance

Mikhail

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I tried this out on an ECC5 systen and it worked fine - my docking control was on the left and the text edit appeared within this sized correctly..


  call screen 2000
    starting at 10 10.

and then


*&---------------------------------------------------------------------*
*&      Form  d2000_initialise
*&---------------------------------------------------------------------*
form d2000_initialise.

  data:
    l_text_length       like sy-tabix,
    l_line_length       like sy-tabix.

  if g_init is initial. "not yet run
    g_init  = 'X'.
    g_repid = sy-repid.
    g_dynnr = sy-dynnr.

* create the docking container
    create object go_docking
      exporting
        repid     = g_repid
        dynnr     = g_dynnr
        side      = go_docking->dock_at_left
        extension = 180.
*" Add text editor:
    if not go_textedit is bound.
      l_text_length  = 10.
      l_line_length  = 10.

* TextEdit Control
      create object go_textedit
        exporting
          parent        = go_docking
          wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
          max_number_chars           = l_text_length
          wordwrap_position          = l_line_length
          wordwrap_to_linebreak_mode = cl_gui_textedit=>true.

    endif.
  endif.

endform.                    "d2000_initialise

3 REPLIES 3

Former Member
0 Kudos

I tried this out on an ECC5 systen and it worked fine - my docking control was on the left and the text edit appeared within this sized correctly..


  call screen 2000
    starting at 10 10.

and then


*&---------------------------------------------------------------------*
*&      Form  d2000_initialise
*&---------------------------------------------------------------------*
form d2000_initialise.

  data:
    l_text_length       like sy-tabix,
    l_line_length       like sy-tabix.

  if g_init is initial. "not yet run
    g_init  = 'X'.
    g_repid = sy-repid.
    g_dynnr = sy-dynnr.

* create the docking container
    create object go_docking
      exporting
        repid     = g_repid
        dynnr     = g_dynnr
        side      = go_docking->dock_at_left
        extension = 180.
*" Add text editor:
    if not go_textedit is bound.
      l_text_length  = 10.
      l_line_length  = 10.

* TextEdit Control
      create object go_textedit
        exporting
          parent        = go_docking
          wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
          max_number_chars           = l_text_length
          wordwrap_position          = l_line_length
          wordwrap_to_linebreak_mode = cl_gui_textedit=>true.

    endif.
  endif.

endform.                    "d2000_initialise

0 Kudos

Hello Jonathan,

Thank you for your reply. It really works. I resolved this problem yesterday in the same way. I tried to init this objects in not PBO section before, and It worked only with screens called as call screen screen_name.

Best Regards,

Mikhail

Former Member
0 Kudos

Make sure that your screen type is modal dialogue box in screen attributes, for specifying 'starting at'.