Application Development and Automation 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: 
Read only

Column width for cl_gui_splitter_container not working

former_member210118
Participant
0 Likes
3,200

Hello friends,

I'm trying to set the column width in a splitter, but the width is not being changed. Can anyone help me ? Here is a draft of my code

At the PBO of the screen form I have the following:


data:

           gobj_split                       TYPE REF TO cl_gui_splitter_container,

          gobj_container_1        TYPE REF TO cl_gui_container,

           gobj_container_2       TYPE REF TO cl_gui_container,

           gobj_drawer_container  TYPE REF TO cl_gui_docking_container,

gobj_right_container   TYPE REF TO cl_gui_docking_container,



*-- Create Container for Drawer (Left)

   IF gobj_drawer_container IS INITIAL.

     CREATE OBJECT gobj_drawer_container

       EXPORTING

         repid     = gv_repid

         dynnr     = gv_dynnr

         extension = 400

       EXCEPTIONS

         others    = 1.

   ENDIF.

*-- Create Container for the right

   IF gobj_right_container IS INITIAL.

     CREATE OBJECT gobj_right_container

       EXPORTING

         repid                       = gv_repid

         dynnr                       = gv_dynnr

         side                        = gobj_right_container->dock_at_right

         extension                   = 1500

       EXCEPTIONS

         cntl_error                  = 1

         cntl_system_error           = 2

         create_error                = 3

         lifetime_error              = 4

         lifetime_dynpro_dynpro_link = 5

         OTHERS                      = 6.

ENDIF.


*-- Create Split Object

CREATE OBJECT gobj_split

     EXPORTING

       parent            = gobj_drawer_container

       rows              = 2

       columns           = 1

     EXCEPTIONS

       cntl_error        = 1

       cntl_system_error = 2

       OTHERS            = 3.


*-- Split into two rows and one column

CALL METHOD gobj_split->get_container "Container for Date & Information

     EXPORTING

       row       = 1

       column    = 1

     RECEIVING

       container = gobj_container_1.

   CALL METHOD gobj_split->get_container "Container for Main Options

   EXPORTING

     row       = 2

     column    = 1

   RECEIVING

     container = gobj_container_2.



*-- Set Row and Column Modes to absolute

CALL METHOD gobj_split->set_row_mode

     EXPORTING

       mode = gobj_split->mode_absolute.

   CALL METHOD gobj_split->set_column_mode

     EXPORTING

       mode = gobj_split->mode_absolute.


*-- Set Row Height (THIS IS WORKING)

  gobj_split->set_row_height( EXPORTING id     = 1

                                                                           height = 50 ).

*-- Set Column Width ( THIS IS NOT WORKING )

   gobj_split->set_column_width( EXPORTING id    = 1

                                                                               width   = 50 ).    

And this is what I get... no matter value I put in line 80, the width doesn't change.

Does anyone have any idea why this is happening ?

Thank you

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,612

You splitted the parent container in two part upper and lower row (2 rows), so you are able to adjust the vertical size, but not the horizontal size (only 1 column)  this size must be adjusted on parent container.

Regards,

Raymond

2 REPLIES 2
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,613

You splitted the parent container in two part upper and lower row (2 rows), so you are able to adjust the vertical size, but not the horizontal size (only 1 column)  this size must be adjusted on parent container.

Regards,

Raymond

Read only

0 Likes
1,612

thank you Raymond...you were right