cancel
Showing results for 
Search instead for 
Did you mean: 

Label misalignment in Grid ComboBox

0 Kudos

Hello All,

Label is too high. I need to allign properly for the ComboBox. and ComboBox is also too away from Label (As mentioned in ScreenShot). Please help me Fix it.

Please find Attached code.

<mvc:View controllerName="Sapui5_cBox_label_allignment.controller.View1" xmlns:html="http://www.w3.org/1999/xhtml"
	xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m" xmlns:l="sap.ui.layout">
	<App>
		<pages>
			<Page title="{i18n>title}">
				<content>
					<l:Grid defaultSpan="L3 M4 S6" class="sapUiSmallMarginTop">
		<l:content>
			<Label text="Combo" textAlign="Right"></Label>
			<ComboBox >
				
			</ComboBox>
		
			
		</l:content>
	</l:Grid>
				</content>
			</Page>
		</pages>
	</App>
</mvc:View>

Thanks and regards,

Urvish

Accepted Solutions (1)

Accepted Solutions (1)

former_member340030
Contributor

Hi Urvish Vijay Panchal,

Can you just use simple forms instead. In that alignment is handled

https://sapui5.hana.ondemand.com/explored.html#/entity/sap.ui.layout.form.SimpleForm/samples

thanks

Viplove

0 Kudos

HI Viplove Khushlani,

I have tried using forms. but issue with form is both label and comboBox is coming in center of the Page. My requirement is to display at left of the Page.

Thanks,

Urvish

former_member340030
Contributor
0 Kudos

Hi ,

Actually forms comes in the center of the parent container control .. you can use H layouts or HBox and make it on the left .. and also you can adjust the label span and span of different control accordingly.

thanks

Viplove

0 Kudos

Hi,

I have used <HBox> and It solved the distance problem with comboBox but alignment issue remains the same. It is still too high as mentioned in Screen shot.

Thanks,

Urvish

former_member340030
Contributor
0 Kudos

If you use Controls in HBox than you need to provide the margins .. so use predefined SAP margin classes .. like sapUiTinyMarginTop as mention in the link below

https://sapui5.hana.ondemand.com/#docs/guide/777168ffe8324873973151dae2356d1c.html

thanks

Viplove

Hey,

It solved the Issue.

Thanks,

Urvish

Answers (0)