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: 

Re: How to reduce the width of Docking Control Container

0 Kudos

Hi All,

I created a text editor control using docking container. Its width is occupying the entire screen. I want to reduce it to half of the screen. I tried changing the values of ratio, extension and used the methods set_width to change it, but was not successful. Please let me know how can i reduce the width. Below is the code which i am using.

data: editor TYPE REF TO cl_gui_textedit,

lo_dock TYPE REF TO cl_gui_docking_container.

IF lo_dock IS INITIAL.

CREATE OBJECT lo_dock

EXPORTING

repid = sy-cprog

dynnr = sy-dynnr

ratio = 75

extension = 50

  • metric = cl_gui_docking_container=>metric_mm

side = cl_gui_docking_container=>dock_at_bottom

name = 'DOCK_CONT'.

IF sy-subrc 0.

MESSAGE 'Error in the Docking control' TYPE 'S'.

ENDIF.

CREATE OBJECT editor

EXPORTING

parent = lo_dock

EXCEPTIONS

error_cntl_create = 1

error_cntl_init = 2

error_cntl_link = 3

error_dp_create = 4

gui_type_not_supported = 5

OTHERS = 6.

CALL METHOD editor->set_text_as_r3table

EXPORTING

table = i_texttable

EXCEPTIONS

error_dp = 1

error_dp_create = 2

OTHERS = 3.

1 REPLY 1

Former Member
0 Kudos

Hi,

Check the other exporting parameter of cl_gui_textedit's constructor.

Try using MAX_NUMBER_CHARS, WORDWRAP_MODE. Pass these paramters while creating object editor.

Regards,

Sharin.