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

container width & height

Former Member
0 Likes
2,367

Hi All,

Hope all are fine !!!

I am using custom container ( cl_gui_custom_container ) to create an alv.

Now the blocking point is with the height and widtht of container i.e., the container's widtht & height are fitting properly according the layout size .

Any soln's to fix the above are highly appreciated

Thanks in advance

Jack

3 REPLIES 3
Read only

Former Member
0 Likes
1,165

You can set the size on the screen, where you have put the custom controll?

Is this your question

Read only

former_member156446
Active Contributor
0 Likes
1,165

you should go to the screen painter, then set up resolution of canvas for 200/240 [rows, cols]. Save it, then change the size for elements (custom control in case of ALV). Now, the tricky part. Go to the attributes of element, allow the horizontal and vertical size change, and set it for some small value , like 5 & 5.

Now the element will adjust itself to the resolution of screen withou using a scroll bars.

Read only

Clemenss
Active Contributor
0 Likes
1,165

Hi jack,

I do not have a real solution. You want to create the container just the right size for the grid.

If the grid is static without column width optimization, you can get the output length Iin characters) of all fields from the field catalog, divide it by an experimental determined pixels per character and add a constant for the frame. Still this is not more than an approximization. And you will run into trouble if the user has scaled down his screen width (find out by checking sy-scols multiplied by some 8 or so pixels) .

I think there shouls be a better way but I don't know.

Regards,

Clemens