Having Decimal Edit Widget in emwin with point and some style

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Having Decimal Edit Widget in emwin with point and some style

    Hi. I've just started to learn and work with emwin. I wonder to know is it possible to have a edit widget that has a decimal value and we can style that decimal.
    for example I want each Edit box has 4 digit and the first one is separated with a point. if my number is less than 4 digit the screen put zero behind the number.
    like this:
    [img]http://oi60.tinypic.com/2h3si6q.jpg[/img]
    I don't want to have floating number and work with text if possible for the sake of simplicity
    Thanks
  • Hallo,

    Please note that emWin internally saves the floating number as integer in the EDIT widget.
    The EDIT widget could be used in float mode to set a dot between the digits.
    The function EDIT_GetValue() could be used to get the value of the EDIT box as integer (if using 012.3 the value is 123).
    Please also note that leading zeros can be suppressed in the function EDIT_SetFloatMode() with the flag GUI_EDIT_SUPPRESS_LEADING_ZEROES.

    Best regards,
    Thorsten

    The post was edited 1 time, last by SEGGER - Thorsten ().