Skip to Content
0
Former Member
Nov 11, 2009 at 05:57 PM

How to reduce the width of Docking Control Container

152 Views

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.