Skip to Content
avatar image
Former Member

numberunit font size in object header

Hi all,

i have to increase the font size of the numberUnit in object header .

i am displaying numberunit from controller to its xml view as below .

this.getView().byId('objHeader').setNumberUnit(quantity);

iam able to display Quantity but have to increase the default font size .

please let me know how to increase font size.

i have attached screen pic.

Regards,

Vamsi

scr1.png (3.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 28, 2015 at 12:14 PM

    Hi Vamshi,

    I show you an example: JS Bin - Collaborative JavaScript Debugging

    You only need redefine .sapMOHNumberDiv .sapMObjectNumberUnit CSS class

    Regards,

    Pau

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 28, 2015 at 11:22 AM

    Hi,

    I think it use SAPUI5 defult font size. U need to have a id or css to that field.

    Add this css line: (asuming id is objHeader)

    then

    objHeader {

        font-size: 62.5%;

    }

    or using Jquery $("#objHeader ").css("font-size","62.5%");

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 28, 2015 at 12:17 PM

    Hi Vamsi,

    Go to Css->

    #objHeader .sapMObjectNumberUnit{

    font-size : 2rem

    }

    REM - relative to the html (root) font-size

    Thanks,

    KA

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 28, 2015 at 12:47 PM

    Hi All,

    Thank you very much for your response .

    but in my object header with id ="objHeader" , i have other fields 'number' and 'text' also which displays other data along with numberUnit.

    i need to increase the font size only for numberUnit. please suggest.

    my complete code

    in XML

    <ObjectHeader id="ObjHeader" number="{material}" title="{description}"></ObjectHeader>

    in controller

    this.getView().byId('objHeader').setNumberUnit(quantity);


    Regards,

    Vamsi

    Add comment
    10|10000 characters needed characters exceeded