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

Split Container

Former Member
0 Likes
996

Hi,

How to split the custom container horizantally (75:25 ratio)

By JJP

3 REPLIES 3
Read only

former_member156446
Active Contributor
0 Likes
610

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.

Read only

0 Likes
610

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

Read only

Former Member
0 Likes
610

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.