So I’m trying to have an input text_area with a special formatting.
Is it possible to have a text_area set with a set of accepted characters but to attach a formatter ?
So basically I want my textArea to only accept number.
But I want I want the final text to be displayed differently. ( \d\d/\d\d )
lv_obj_t* _inputWidget = lv_textarea_create(lv_scr_act(),0); lv_textarea_set_accepted_chars(_inputWidget,"0123456789"); //mask lv_textarea_set_max_length(_inputWidget,4); lv_obj_set_event_cb(_inputWidget,formatterCb);
Nb I don’t want to allow the “/” char, I want to have a postCb formatted which would basically do
int expDate = atoi(lv_textarea_get_text(_inputWidget); sprintf("%02d/%02d,expDate/100,expDate%100),
This is a simple example, but I have other more complex needs (where input != display)
How do you guy do it ?