cancel
Showing results for 
Search instead for 
Did you mean: 

Set dynamically the custom control size(attributes) for ALV

Former Member
0 Kudos

The custom control attributes/size are set statically in SE51 when creating it on the screen. When changing the display resolution on the frontend (Windows) I would like to be able to fit this custom control on the screen to fill the full screen.

If you design the size to fit the whole screen at the low resolution you will have rather large empty margins at high resolution - if you do it at high resolution you will have navigation issues with multiple scroll bars(one set for the window, and one set for the container) at low resolution.

This is automatically done for you if you use the function module approach for ALV.

I tried unsuccesfully to do this using methods of CL_GUI_CONTROL, and would appreciate any tips.

Thanks,

Miklos

Accepted Solutions (1)

Accepted Solutions (1)

RichHeilman
Developer Advocate
Developer Advocate

In screen painter, double click on the control. In the attributes box, there will be checkboxes for "Resizing" vertically and horontally. Check them both. Save and Activate. Make sure to make the control as big as possible on the screen. Doing all this will force the control to be resized depending on the screen resolution.

Regards,

Rich Heilman

Answers (1)

Answers (1)

former_member188685
Active Contributor

Hi,

check the <b>BCALV_FULLscreen_demo,</b>

i am not near the system, just go to screen attributes of the demo program and change your screen attributes as they are in demo program.

regards

vijay

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Vijay, that program actually uses the function module REUSE_ALV_GRID_DISPLAY, not the control.

Regards,

Rich Heilman

Former Member
0 Kudos

HI Rich,

Thanks for the tip - I tried the resize before with setting soem values (corresponding to the low resolution values) and it did not work. But gave another try with setting length 1 and height 1 - and worked fine.

Thanks again - I awarded the points.

Miklos

former_member188685
Active Contributor

hI rich,

i know it is alv fm, but after display, just choose menu

system->status then choose the screen number and click on the screen ,and go to layout ,screen attributes you can see the container in the screen, from there we can get the attributes.

regards

vijay

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Oh, I misunderstood. Sorry.

Regards,

RIch Heilman