cancel
Showing results for 
Search instead for 
Did you mean: 

Label left align in simple form

former_member194533
Participant
0 Kudos

Hi Experts ,

         I have a silly question .

I created a very simple form using Simple form layout . Below is the code .

<f:SimpleForm title="The Simpel form layout " maxContainerCols="2" editable="true">

   <f:content>

    <Label text="FirstName" textAlign="Left"></Label>

    <Input type="Text" width="300px" ></Input>

  

    <Label text="name" textAlign="Left"></Label>

    <Input type="Text" width="300px" ></Input>

    </f:content>

  </f:SimpleForm>

Now I am able to get the out put as shown in the screen shot attached.

But its labels are right aligned . I want the labels to be left aligned . I already tried with textAligh = "Left" But no luck .

Can any one suggest here..

Thanks

Rizwan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

In general, I've always found form layouts to be a bit tricky to work with. In my experience they don't offer as much control as needed in certain situations. But my best guess would be that you should rather play around with the form's layout data instead of the Label's alignment. For example, you can set the layout of the form to layout: "ResponsiveGridLayout", and you should be able to see that the content is already aligned a bit more to the left. As in this jsbin example: JS Bin - Collaborative JavaScript Debugging (just make the output window a bit wider to see the effect)

I would suggest looking at JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.layout.form.SimpleForm to get an idea of what properties you can play around with in order to get the desired layout.

Unfortunately I'm not very familiar with form layouts so I can't give a lot more information, but I hope this gets you on the right track.I would also suggest using the UI5 chrome extension, since it can provide a much faster method of seeing what changing a property results in UI5 Inspector - Chrome Web Store

Regards

Abdul_Waheed
Contributor
0 Kudos

Did you tried textAlign="Begin"     ?

WouterLemaire
Active Contributor
former_member194533
Participant
0 Kudos

Hi Lemaire,

         None of them is working , I already tried all those options . Kindly suggest if any other sollution for this .

Thanks

Rizwan

former_member194533
Participant
0 Kudos

Hi Waheed,

         None of them is working , I already tried all those options . Kindly suggest if any other sollution for this .

Thanks

Rizwan