Hi all,
I wanna enable a button when I click another button .
How can I do?
Let me kow please
Thanks in advance
Francesco Pugliese
hello, thanks for fast reply.
But i wanna handle mor object lv_obj_t * in one callback. For example:
static void press_ON_button_Cb(lv_obj_t *obj, lv_event_t event){
switch(event){
case LV_EVENT_SHORT_CLICKED:
break;
case LV_EVENT_RELEASED:
if(obj==btn_ON){
lv_obj_set_hidden(obj, true);
lv_obj_set_hidden(btn_OFF, false);
}
if(obj==btn_OFF){
lv_obj_set_hidden(obj, true);
lv_obj_set_hidden(btn_ON, false);
}
}
It doesn’t work.
How can I resolve?
Let me know
Thanks in advance
Francesco Pugliese
Another question:
Once that the object is declared. How can I recovery the object in the callback? Because the pointer to the object changes. If I call lv_obj_t *obj in a callback, it is another pointer different from button_ON.or button OFF.
How can I resolve?
Francesco Pugliese
Thanks in advance
Let me know please
It should work this way. Can you check with a debugger what is problem?
There should be some problem somewhere. obj
is the event should be the same what a ..._create
function returned.