cancel
Showing results for 
Search instead for 
Did you mean: 

vAlign doenst work on a label in a xml view

0 Kudos

Hi,

i'm trying align a label in SAP UI5 vertically to an input field in the same line, vAlign is indeed documented as applicable on a label and descripted like (https://sapui5.hana.ondemand.com/#/api/sap.m.Label%23controlProperties😞

Specifies the vertical alignment of the Label related to the tallest and lowest element on the line.

Since my only other element in the line next to the label is an input field, this should be an easy job. To my surpirise, valign doesnt seems to cause any changes in the layout. My idea to use it would be like:

            <App id="app">


                       
<pages>


                                   
<Page title="{i18n>title}">


                                   
           
<content>


                                                           
<l:VerticalLayout width="100%">


                                                                       
<l:Grid defaultSpan="L6 M6 S6" containerQuery="true"
hSpacing="1" vSpacing="1" position="Center">


                                                                                                           
<Label vAlign="Middle" text="{i18n>solManReq}" labelFor="solManReqInput"/>


                                                                                                           
<Input id="solManReqInput"
class="sapUiSmallMarginBottom" type="Text"


                                                                                                                       
valueStateText="Solution manager change request number must not be
empty"


                                                                                                                       
value="{ path : '/name', type : 'sap.ui.model.type.String', constraints :
{ minLength: 1, maxLength: 10 } }" showValueHelp="true"


                                                                                                           
            valueHelpRequest="helpRequestSolManId"/>
former_member466198
Participant
0 Kudos

Hi Don,

kindly upload the pic of the current state and required state(how you want it).

it will help me to answer your question.

thanks

Abhishek

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member466198
Participant

Hi Don,

try this,

since you already use the vertical layout on the top, so please remove vAlign from the label.

I think it will work without valign.

if it doesn't work, please upload the images of current state and how you want it.

thanks

Abhishek

0 Kudos

Guys, just to let you know - never found an answer to my question. Ive opened an OSS call and have asked our SAP colleagues directly, but was pointed to the "what is consulting" note.

So I got the clue from SAP its probably not a product problem, so we still dont know how to use vAlign right. It doesnt seems Im the only stupid - I raised this question within own company, but none of our senior and principal consultanst were able to deliver an answer.

My customer was neither surprised by the support nor documentation quality coming from Walldorf, they are used to this, so I wont track that one longer,

br

0 Kudos

Hi abhishek.kumar

thank you for your frienldy help. Im sorry to have been too spartan on the description. In fact this issue, including working example and screenshot, is already documented on stackoverflow:

https://stackoverflow.com/questions/28981312/vertical-label-alignment-in-sapui5-label-too-high

resp.

http://embed.plnkr.co/F2hZTBtSMNDKkNW0MrU6/preview

I found this runtime behaviour also on own WebIDE PE. For obvious reasons, as already stated by Tim Gerlach within this thread, this cant be a real life solution. Our customers are doing serious business, I would have concerns by suggesting them to transport such stuff on production.

Thus I assumed must be a kind of strange workaround and Im on the wrong path, also found vAlign property, but it seems I didnt understood how its supposed to work, thanks