LVGL radio button (checkbox) group

What do you want to achieve?

I am attempting to have a group of radio/checkbox items whereby if one is selected the remaining will be deselected and have a handle on the selected item

What have you tried so far?

Attempted to use the process outlined in LVGL docs Checkbox (lv_checkbox) — LVGL documentation but that code may be fine on a stand alone but not in the EEZ studio page framework

Code to reproduce

/*You code here*/
void action_set_source(lv_event_t *e) {
int * lv_checkbox; // create a user data type pointer
lv_checkbox = (int*)lv_event_get_user_data(e); // cast the return pointer to data type pointer
//printf("btn no. %d \n", * lv_checkbox); // use the pointer value…
//printf("user data is %d\n", lv_checkbox);
if (lv_checkbox != NULL) {
    if (*lv_checkbox == 1)
    {
        printf("on one");

    }
    else{
        printf("who knows on one");
    }
} else {
    printf("no user data\n");
} << causes a reboot (bad code)

Screenshot and/or video

Environment

  • MCU/MPU/Board: ESP32 dev module 8 meg
  • LVGL version: 9.4

RadioBtn lvgl obj - SDK/apps/common/ui/lvgl_v8/src/extra/widgets/radiobtn/lv_radiobtn.c · d0167685d032d745d88fe50233302edd46941622 · e_badge / e_badge_707_sdk_200 · GitLab

I could not make this work within the framework of EEZ Studio no matter how many times I tried (looks like a bug). I changed over to a button matrix. With a huge modification to the code, I was able to achieve this" If anyone is interested in the code, reply to this post