Spinbox style and modes

Description

Good morning. I’ve just inserted a spinbox in my application and I’m wondering if it is possible to achieve the following:

  • Avoid the cursors selected when the spinbox is not focused or removed from the group
  • If I have more than one digit to show (at most), avoid showing zeroes as leading digits (e.g. 04). I can use buttons to increase or decrease the value even if the spinbox is not focused.

What MCU/Processor/Board and compiler are you using?

I’m using a custom board based on iMXRT1052

What LVGL version are you using?

v8.0.2

What do you want to achieve?

What have you tried so far?

I tried the function lv_textarea_set_text_selection for my first point.

Thanks a lot,
Marco

lv_spinbox_set_digit_format should work for your second bullet. For the first, complete shot in the dark here but you might be able to disable it by modifying the style? 7.11 docs mention something about an LV_SPINBOX_PART_CURSOR and point to the Text Area section. If that functionality still around, you can probably change its opacity/background opacity to 0 or something along those lines.

Did you ever get this working?
A quick hack is to change this, '0' character to a space ' '.

It would be nice to write/have a function to switch between them, seems more efficient than double handling with styles.

Not yet unfortunately. On our current project is low priority.