on 05-28-2018 5:02 PM
Hello.
I'm trying to create a configuration app, with only Switch components, like this :
(Here I use it inside a Form)
The problem is that I want the labels to be on the other side, after the Switch.
But I can't find a proper way to archive this.
Tried with HBox / VBox , FlexBox...but when I have the label on the other side, it displays bad:
Is there a way to see it correctly in the middle? Without the use of custom CSS?
SAP used Swtich compones on this way on the user settings page, on the notification settings:
Thx in advance.
here is the code,
<FlexBox alignItems="Center" justifyContent="Start">
<items>
<Switch state="true" class="sapUiSmallMarginEnd"></Switch>
<Text text="Label on the right side"></Text>
</items>
</FlexBox>
-if you still don't want to use standard class "sapUiSmallMarginEnd" then you can define the layout for particular control as below and set growFactor property as required,
<Switch state="true">
<layoutData>
<FlexItemData growFactor="1" />
</layoutData>
</Switch>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Instead of custom css why cant you use margin default classes from SAP ... Those are safest options ..
And even you can see the flex box properties which will help you to align the content of hbox and vbox .. alignContent , alignItems, displayInline and justifyContent ..
https://sapui5.hana.ondemand.com/#/api/sap.m.FlexBox/controlProperties
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
use editable property of form control to align labels in middle .
editable="true"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.