2013 Nov 06 9:13 AM
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
2013 Nov 06 9:48 AM
Hi Gopal,
why did you use splitter if you would like to have fixe containers ? define two fixe containers
regards
Fred
2013 Nov 06 10:02 AM
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
2013 Nov 06 10:08 AM
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
2013 Nov 06 10:19 AM
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.
2013 Nov 06 10:23 AM
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.
2013 Nov 06 10:53 AM
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
2013 Nov 06 10:14 AM
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
2013 Nov 06 10:25 AM
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.
2013 Nov 06 10:29 AM
2013 Nov 06 10:43 AM
This definitely works:
splitter->set_row_sash( id = 1
type = splitter->type_movable
value = splitter->false ).
2013 Nov 06 10:55 AM
Yes splitter 1 is between container 1 and 2, etc.
Regards,
Raymond