cancel
Showing results for 
Search instead for 
Did you mean: 

How can I align the ROOTCONTAINERUIELEMENT to the center position

former_member94854
Participant
0 Kudos

Hi collegues,

i would like to display my Web Dynpro ABAP application in the center position of the browser. I'm using the matrix layout as layout control for the ROOTCONTAINERUIELEMENT. The attributes strechtedHorizontally and strechtVertically are unchecked. I tried to set the width attribute to 100% and align another container element to the center by setting the attribute hAlign with the value center. Unfortunately it doesn't work. Maybe anybody of you has another idea.

Kind regards,

Albert

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Albert,

AS in WD for Java:

We cannot center align the root container. Instead, we can define it's width as 100%. Then define another container inside that, set it's LayoutData width as 100% and halign as 'center'. Set the Container width as what you require, say 60%. So the container data will occupy 60% of the screen and will be aligned to the center.

Hope this helps,

Best Regards,

Nibu.

former_member94854
Participant
0 Kudos

Hi Nibu,

unfortunately, when i use the 100% value for attribute width of ROOTCONTAINERUIELEMENT, it doesn't take the complete width space of the browser, but the size of my container inside. When i use for example the value 1000px instead of the 100% in that way you described before, it works. But this solution isn't exactly that what I#m looking for. Is there any other opportunity.

Regards,

Albert

Yashpal
Active Contributor
0 Kudos

Hi Albert,

try with gridlayout for the rootcontainer and to all other container and for rootcontainer set the width and height to 100%.

Regards,

Yash

Former Member
0 Kudos

Have you tried to set the layout of the root container to MatrixLayout, stretchedHorizontally=true, width=100%?

Armin

Answers (0)