08-17-2009 1:45 PM
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.
08-17-2009 1:56 PM
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
08-17-2009 1:57 PM
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
08-17-2009 1:57 PM
Reduce the ratio (or extension) value in the constructor method.
Regards,
Raymond
08-17-2009 2:00 PM
Hi Rachana,
In Exporting Parameter try changing the valur of 'ratio'. That should help you reduce the size.
Regards,
Sana.
08-17-2009 2:01 PM
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.