‎2009 Jun 10 5:47 AM
Hi,
How to split the custom container horizantally (75:25 ratio)
By JJP
‎2009 Jun 10 5:58 AM
I believe you need to design your custom container in SE51 so check the screen resolution and calculate the 75:25 ratio and draw a container as per the calculation.
‎2009 Jun 10 6:04 AM
Create an object say GV_C_SPLIT type ref to cl_gui_splitter_container
Then call the following methods:
CREATE OBJECT gv_c_split
EXPORTING
parent = gv_custom_container
rows = 2
columns = 1
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
others = 3.
CALL METHOD gv_c_split->set_border
EXPORTING
border = space.
CALL METHOD gv_c_split->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = gv_container1.
CALL METHOD gv_c_split->set_row_height
EXPORTING
id = 1
height = 6
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 6 .
CALL METHOD gv_c_split->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = gv_container2.
CALL METHOD gv_c_split->set_row_height
EXPORTING
id = 2
height = 4
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3 .
You have to change the height value to get the desired ratio i.e. 75:25
Now you have two containers gv_container1 and gv_container2 for your use
‎2009 Jun 10 6:00 AM
JJP,
when instantiating class CL_GUI_EASY_SPLITTER_CONTAINER you need to specify the parameters ORIENTATION (Orientation: 0 = Vertical, 1 = Horizontal) and SASH Position of Splitter Bar (in Percent).
Have a look at the constructor method of the class for further info.
Cheers,
Neil.