cancel
Showing results for 
Search instead for 
Did you mean: 

Space between buttons (sap.m.Button) in HorizontalLayout

Former Member
0 Kudos

Hi there,

I have a sap.ui.layout.HorizontalLayout and inside (content) are some sap.m.Button controls. All these controls show up fine, but without padding/margin to each other, which leads to looooooong button with multiple words on it. At least it looks like so.

How do I define a padding/margin for the HorizontalLayout container, so every control inside gets a padding/margin automatically?

Thank you,

Tobias

Accepted Solutions (1)

Accepted Solutions (1)

jmoors
Active Contributor
0 Kudos

In the document it implies that spacing can't be controlled in the HorizontalLayout, so looks like you need to define in CSS.

HorizontalLayout

This example shows a simple HorizontalLayout.
Spacing between the items is currently not adjustable in the HorizontalLayout and has in this case been added with the following CSS:

#myTextField { margin: 0 4px; }  

https://sapui5.hana.ondemand.com/sdk/#test-resources/sap/ui/layout/demokit/HorizontalLayout.html

Regards,

Jason

Former Member
0 Kudos

Thank you.

It's not the prefered solution, but I will find a workaround that works.

I thought it was supported by the framework, in the meantime.

Answers (0)