cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove space in between mandatory * and title in SAPUI5.

former_member189929
Participant
0 Kudos

Hi All,

I have a form like below screen shot.

Now we have space between the * and title Payment Method.

I am using following code

new sap.ui.commons.form.FormElement({

                                     label: "Payment Method",

                                     fields: [new sap.ui.commons.ComboBox("PaymentMethod", { items : [

                                                                                         new sap.ui.core.ListItem("PaymentMethod1", {text:"Wire"}),

                                                                                        new sap.ui.core.ListItem("PaymentMethod2", {text:"ACH"})],

                      required:true,

                      })

                                     ],

                                     layoutData: new sap.ui.commons.layout.ResponsiveFlowLayoutData({linebreak: true, margin: true})

                             }),

Thanks in advance.

Ravi Varma

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ravi,

can't you style it using some custom CSS? Use firebug and play around with the applied styles.

I think that shouldn't be a big deal...

Greets,

Ben

EDIT:

You can modify the following selecot:

.sapUiGridLabel > .sapUiLbl.sapUiLblReq:before {
    color: #006CA7;

    content: "*";

    font-size: 20px;

    font-weight: bold;

    padding-right: 5px;

    vertical-align: middle;

}

Just remove the line "padding-right: 5px;" or set it to 0px and the space will be gone


Or write an aditional style class and overwrite the padding as Manoj suggested.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ravi,

Ben Gives you right solution,I just something more if you are specific for any single controls.

You can use addStyleClass("Style Name") for any Specific Control.

Regards

Manoj