Reputation: 63
As the Title states.
My attempt:
<VBox>
<HBox alignItems="Right" id="Tabelle">
<Button visible="true" enabled="true" icon="sap-icon://navigation-right-arrow" />
<Button visible="true" enabled="true" icon="sap-icon://open-command-field" />
<Button visible="true" enabled="true" icon="sap-icon://process" />
</HBox>
</VBox>
Adding an alignItems
-> to the Right so the Elements of Hbox
will be put on the Right side of VBox
but it seem not to work.
Why is not working?
Upvotes: 3
Views: 9885
Reputation: 1301
HBox (and VBox) is basically a Flexbox, to put the content to the right use justifyContent
not alignContent
nor alignItems
.
<HBox justifyContent="End" id="Tabelle">
<Button visible="true" enabled="true" icon="sap-icon://navigation-right-arrow" />
<Button visible="true" enabled="true" icon="sap-icon://open-command-field" />
<Button visible="true" enabled="true" icon="sap-icon://process" />
</HBox>
Good reference for flexbox positioning: https://css-tricks.com/snippets/css/a-guide-to-flexbox/
Edit 1: Added Example Edit 2: Grammar & Typos
Upvotes: 5
Reputation: 2256
The best control I can suggest it FlexBox
<FlexBox
alignItems="Center"
justifyContent="End">
<items>
<Button enabled="true" icon="sap-icon://navigation-right-arrow" class="sapUiSmallMarginEnd"/>
<Button enabled="true" icon="sap-icon://open-command-field" class="sapUiSmallMarginEnd"/>
<Button enabled="true" icon="sap-icon://process" />
</items>
</FlexBox>
Output
Upvotes: 4
Reputation: 11
Try with alignContent
instead of alignItems
OR combination of both. It seems that both have some impact.
You can check the HBox API documentation as well
Upvotes: 1