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: 

Query Regarding 'cl_gui_docking_container'

Former Member
0 Kudos

Hi ,

I had to add a Custom Conatiner in a Selection Sreen and I have used docking container for the same u201Ccl_gui_docking_containeru201D.

DATA: g_custom_container TYPE REF TO cl_gui_docking_container.

CREATE OBJECT g_custom_container

EXPORTING

repid = sy-repid

dynnr = sy-dynnr

ratio = 80

side = cl_gui_docking_container=>dock_at_bottom

name = 'Container'.

IF sy-subrc <> 0.

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

ENDIF.

The display is coming fine in the screen. However, is there a way to reduce the size of the container? Currently it is covering the entire screen size. I would want to minimize the size, but have failed to understand how.

Please Help,

Thanks in Advance,

Rachana Govind.

5 REPLIES 5

former_member223537
Active Contributor
0 Kudos

Hi Rachana,

Open the above class in SE24 & you will find several methods viz SET POSITION etc to adjust the height & width.

Thanks,

Best regards,

Prashant

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Yes change the RATIO value in your CONTRUSTOR(CREATE OBJECT), Or you can use the EXTENSION parameter in your constructor. YOu can set the value to something like 150,

CREATE OBJECT g_custom_container
EXPORTING
repid = sy-repid
dynnr = sy-dynnr
ratio = 20   "<---  Set this OR
extension = 150 "<-- Set this
side = cl_gui_docking_container=>dock_at_bottom
name = 'Container'.
IF sy-subrc 0.
MESSAGE 'Error in the Docking control' TYPE 'E'.
ENDIF.

Regards,

Rich Heilman

raymond_giuseppi
Active Contributor
0 Kudos

Reduce the ratio (or extension) value in the constructor method.

Regards,

Raymond

Former Member
0 Kudos

Hi Rachana,

In Exporting Parameter try changing the valur of 'ratio'. That should help you reduce the size.

Regards,

Sana.

Former Member
0 Kudos

Hi,

You could probably use the methods SET_WIDTH and SET_HEIGHT and alter the size of the docking container.


  CALL METHOD g_custom_container ->set_height
      EXPORTING
        height = 100.
  CALL METHOD g_custom_container ->set_width
      EXPORTING
        width = 100.