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

Resize container created by Splitter

Former Member
0 Likes
1,559

Dear SAP friends,

How you can resize a container ( NOT custom container) created by splitter?

Methods get_height, get_width return value = 0.

Here are excerpts from my code.

DATA:
      splitter_vh                   TYPE REF TO cl_gui_splitter_container,
      container_middle_left    TYPE REF TO cl_gui_container.
DATA:
  w_height TYPE i,
  w_width  TYPE i.


  CREATE OBJECT splitter_vh
    EXPORTING
      parent  = container_middle
      rows    = 1
      columns = 2.

  container_middle_left         = splitter_vh->get_container( row = 1 column = 1 ). "  tedit1

  CALL METHOD container_middle_left->get_height
    IMPORTING
      height = w_height.
  CALL METHOD container_middle_left->get_width
    IMPORTING
      width = w_width.

  CALL METHOD container_middle_left->set_height
    EXPORTING
      height = 1.
  CALL METHOD container_middle_left->set_width
    EXPORTING
      width = 2.

2 REPLIES 2
Read only

Former Member
0 Likes
806

Hi,

Use the SET_COLUMN_WIDTH or SET_ROW_HEIGHT for adjusting the window size of the containers instead of trying to change the container size. The methods are of the Splitter Container itself.

Read only

Former Member
0 Likes
806

SKC,

Actually I created 2 containers in my program -I just skipped that code in this post:

  container_middle_left         = splitter_vh->get_container( row = 1 column = 1 ). "  tedit1
  container_middle_right        = splitter_vh->get_container( row = 1 column = 2 ). "  logo html

I want to have them of different row size. This is why your suggestion doesn't work for me.

Of course - I can go and split container_middle_left to make it of different size.

But why whould I do that if there are methods set_height and set_width for a container?

Thanks,

Tatyana