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: 

How to create fixed container ALV (OO ALV) that is with no manual resizing?

gopalkrishna_baliga
Participant
0 Kudos
786

Hi Experts,

  I have used OO ALV. I have used splitter to create two container one above the other.

  But user can manually resize the ALV containers. How can we prevent manual resizing?

  I have used below code. But it does not help. User can still resize.

CALL METHOD splitter->set_row_height
             EXPORTING
               id     = 2
               height = 8..

Please help.

Thanks

Gopal

11 REPLIES 11

FredericGirod
Active Contributor
0 Kudos
375

Hi Gopal,

why did you use splitter if you would like to have fixe containers ?  define two fixe containers

regards

Fred

vladimir_erakovic
Contributor
0 Kudos
375

Hi Gopal,

If you use splitter container instead of custom you can disable the resize with:

  CALL METHOD splitter->set_enable

  EXPORTING

    enable = '0'.

It's working, just tried.

Best regards,

Vladimir

raymond_giuseppi
Active Contributor
0 Kudos
375

Use method SE_ROW_SASH :

CALL METHOD splitter->set_row_sash
           EXPORTING
             id    = 2
             type  = cl_gui_splitter_container=>type_movable
             value = cl_gui_splitter_container=>false.

Regards,

Raymond

0 Kudos
375

I have tried like below. But still does not work.

CREATE OBJECT custom_container
       EXPORTING
         container_name = 'CONTAINER'.


CREATE OBJECT splitter
         EXPORTING
           parent  = custom_container
           rows    = 3
           columns = 1
           align   = 15.

**   get part of splitter container for 1st table
     CALL METHOD splitter->get_container
       EXPORTING
         row       = 1
         column    = 1
       RECEIVING
         container = graphic_parent1.


**   get part of splitter container for ALV header
       CALL METHOD splitter->get_container
         EXPORTING
           row       = 2
           column    = 1
         RECEIVING
           container = v_parent_html.

* Set height for g_parent_html
       CALL METHOD splitter->set_row_height
         EXPORTING
           id     = 2
           height = 0.

       CALL METHOD splitter->set_row_sash
         EXPORTING
           id    = 2
           type  = cl_gui_splitter_container=>type_movable
           value = cl_gui_splitter_container=>false.

**   get part of splitter container for 2nd table
       CALL METHOD splitter->get_container
         EXPORTING
           row       = 3
           column    = 1
         RECEIVING
           container = graphic_parent2.

0 Kudos
375

Try like this:

CREATE OBJECT custom_container

     EXPORTING

       container_name = 'CONTAINER'. "use uppercase letters!

*

**   create splitter container in which to place graphics

   CREATE OBJECT splitter

     EXPORTING

       parent  = custom_container

       rows    = 2

       columns = 1

       align   = 15. " (splitter fills the hole custom container)

**   get part of splitter container for 1st table

   CALL METHOD splitter->get_container

     EXPORTING

       row       = 1

       column    = 1

     RECEIVING

       container = graphic_parent1.

**   get part of splitter container for 2nd table

   CALL METHOD splitter->get_container

     EXPORTING

       row       = 2

       column    = 1

     RECEIVING

       container = graphic_parent2.

     CALL METHOD splitter->set_enable

   EXPORTING

     enable = '0'.

It's working.

0 Kudos
375

You could try to fix other splitter (id 1, 3) also you could hide splitter with

call method spliter->set_row_sash
       exporting
         id                = 2
         type              = cl_gui_splitter_container=>type_sashvisible
         value             = cl_gui_splitter_container=>false.

Regards,

Raymond

sivaganesh_krishnan
Contributor
0 Kudos
375

HI gopalkrishna,

For making the container to be fixed , use set_enable method .

Just write like ,

call method splitter_obj->set_enable

EXPORTING

    enable = '0'.

Regards,

Sivaganesh

0 Kudos
375

Hi Sivaganesh,

 

   I tried with

call method splitter->set_enable

EXPORTING

    enable = '0'.

  

Now it has made all the containers fixed. But now I am unable to click on radio buttons or checkboxes that I have in the ALV.

vladimir_erakovic
Contributor
0 Kudos
375

I just saw that too!

It's absolutely disabled

vladimir_erakovic
Contributor
0 Kudos
375

This definitely works:

splitter->set_row_sash( id    = 1

                             type  = splitter->type_movable

                             value = splitter->false ).

0 Kudos
375

Yes splitter 1 is between container 1 and 2, etc.

Regards,

Raymond