Simple Button matrix issue

i had create a Simple Button matrix but not able to create its event handler when i enable below function it shows error. is there is any other provision to set object event?

lv_obj_set_event_cb(btnm1, event_handler);


Description Resource Path Location Type
‘event_handler’ undeclared (first use in this function) NumericKeypad.c /stm32f746_discovery_no_os/src/menu line 58 C/C++ Problem

This looks like a C/C++ issue, not a LittlevGL issue. The event_handler function is not declared within the scope of the function you are using it in. A code sample would be very useful to help diagnose the problem.

Also, please use the How-to template for future posts.

i am using stm32f746 disco and GL version is 5.3. just using the sample code given in gl documents below is link

error code is with this lv_obj_set_event_cb function i had tried to find the function but it is missing in lv_obj.c file.

The documentation you have linked is for version 6.1 (which I strongly recommend upgrading to). Version 5.3 is now about a year old and very out of date. It does not have event handlers, only action handlers (which have been removed in 6.0).

is there is any link how to update from 5.3 to 6 version? or any pre compiled project for stm32f746 with 6.0 littleGL library that will be really helpfull

All of the important release information is available here:

This project currently uses 6.0 but I will update it to 6.1 soon. 6.1 is a minor upgrade so you shouldn’t need to do anything besides running git pull and git submodule update --recursive to update.