Unable to get clicked button and their text of ButtonMatrix. Also unable to see LV_SYMBOL_BACKSPACE & LV_SYMBOL_NEW_LINE on ButtonMatrix. It shows as blank square box

Description

I want to implement ButtonMatrix using WPF C# (Visual Studio 2019). I have implemented code, but if I will click on any button of ButtonMatrix, then I am unable to get button and their text. I want to show clicked button text in TextArea object. After Ok button (LV_SYMBOL_NEW_LINE) click, I want to give this text of TextArea to my screen object.

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

Visual Studio 2019 using WPF C# compiler.

What LVGL version are you using?

V9-master

What do you want to achieve?

I want to create ButtonMatrix with TextArea. On ButtonMatrix 's button’s click, I want to add clicked button text/number to TextArea. After click on Ok button (LV_SYMBOL_NEW_LINE), I want to give that text to my screen object (in below image, it is 99999 object).

What have you tried so far?

Please refer my below implemented code:

Code to reproduce

In my LVGL project, I have created NumericKeyPad.c file. It contains below code:

#include "lvgl/lvgl.h"

#if LV_USE_BUTTONMATRIX


static void buttonmatrix_event_handler(lv_event_t* e)
{
    lv_event_code_t code = lv_event_get_code(e);

    lv_obj_t* btnmatrix = lv_event_get_target(e);
    lv_obj_t* text_area = (lv_obj_t*)lv_event_get_user_data(e);

    if (code == LV_EVENT_VALUE_CHANGED) // It doesn't go inside this if condition.
    {
        uint32_t btn_id = lv_buttonmatrix_get_selected_button(btnmatrix);
        const char* txt = lv_buttonmatrix_get_button_text(btnmatrix, btn_id);
        LV_LOG_USER("%s was pressed\n", txt);
        lv_textarea_set_text(text_area, txt);
    }
}

_declspec(dllexport)  lv_obj_t* Add_NumericKeyPad(int x, int y, int width, int height)
{  
    lv_obj_t* ta = lv_textarea_create(lv_screen_active());
    lv_textarea_set_one_line(ta, true);
    lv_obj_set_size(ta, 200, 50);
    lv_obj_set_pos(ta, x, y);
    lv_obj_add_state(ta, LV_STATE_FOCUSED); /*To be sure the cursor is visible*/
       
    static const char* btnm_map[] = { "1", "2", "3", "\n",
                                      "4", "5", "6", "\n",
                                      "7", "8", "9", "\n",
                                      LV_SYMBOL_BACKSPACE, "0", LV_SYMBOL_NEW_LINE, ""
    }; //unable to see LV_SYMBOL_BACKSPACE & LV_SYMBOL_NEW_LINE on ButtonMatrix. It shows as blank square box.

    lv_obj_t* btnm = lv_buttonmatrix_create(lv_screen_active());
    lv_buttonmatrix_set_map(btnm, btnm_map);
    lv_obj_add_event_cb(btnm, buttonmatrix_event_handler, LV_EVENT_ALL, ta);

    lv_obj_set_size(btnm, 200, 150);
    lv_obj_set_pos(btnm, x, y + 60);

    return ta;
}

#endif

Screenshot

It shows as like below after drawing ButtonMatrix with TextArea. I have shown visual cues for Text Area.