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 docking container at runtime

Clemenss
Active Contributor
0 Likes
1,439

Hi container addicts,

My report has a selection screen. Below I create a docking container (with SALV grid) docked at bottom with calculated extension that the select-options are still visible.

The customer wants a toggle button to extend the control to the full screen area and make it small again to have the selections visible.

Will I have to destroy the container and then recreate container and grid with different size or can I re-size the container at run time dynamically?

Thanks for useful hints.

Regards,

Clemens

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
690

The SET_EXTENSION method is available for you to use to reset the extension value.

Regards,

Rich Heilman

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
691

The SET_EXTENSION method is available for you to use to reset the extension value.

Regards,

Rich Heilman

Read only

0 Likes
690

Thank you Rich,

this works fine. Obviously the extension is measured in something like points or pixels.

I tied a dynamic solution regarding the actual screen size with constants for the selection screen area (mc_rows_selection_area. = 4) and estimated pixels per row mc_graph_units_per_row = 12.

It works approximately, but not too exact. Are you aware of any methods to determine the full screen size (without standard tool bar) in the kind of units we need for SET_EXTENSION method?

* provide dynamic screen space
  IF sy-srows <= mc_rows_selection_area.
    lv_srows = mc_rows_selection_area.
  ELSE.
    lv_srows = sy-srows - mc_rows_selection_area.
  ENDIF.
* extension in pixels(?) as n pixels per row
  lv_extension = mc_graph_units_per_row * lv_srows.
  set_docking_extension( lv_extension ).

Thanks a lot.

Regards,

Clemens