Add multiple controls to CL_GUI_SPLITTER_CONTAINER?

Viewed 392

I'm trying to build my screen with OO-Coding and therefore I'm using CL_GUI_SPLITTER_CONTAINER to split my screen in areas.

But when I add two or more CL_GUI_INPUT_FIELD to one SPLITTER_CONTAINER, I just see one of the control on the screen.

It just works, when I use a splitter container for each control, like a grid-system. But this doesn't suit well.

  IF mo_body_content IS INITIAL.
    mo_body_content = NEW cl_gui_splitter_container(
          parent = mo_body_container->get_container( row = 1 column = 2 )
          rows = 1
          columns = 2
         ).

    mo_body_content->set_border( abap_false ).
    mo_body_content->set_column_sash( id = 1 type = cl_gui_splitter_container=>type_movable value = cl_gui_splitter_container=>false ).
    mo_body_content->set_column_sash( id = 1 type = cl_gui_splitter_container=>type_sashvisible value = cl_gui_splitter_container=>false ).
  ENDIF.


  DATA(input) = NEW cl_gui_input_field(
    parent = mo_body_content->get_container( column = 1 row = 1 )
    label_text = 'Surname'
    label_width = 9
      ).
  DATA(input2) = NEW cl_gui_input_field(
    parent = mo_body_content->get_container( column = 1 row = 1 )
    label_text = 'Name'
    label_width = 4 ).
0 Answers
Related