MetaTrader 5 not able to capture mouse events correctly

 

Hi,

I encountered the following strange situation in trying to catch the mouse events. Here is my scenario:

1) Display a list of items of OBJ_LABEL type.

2) Display a few buttons (OBJ_BUTTON) and some of them are overlapping the labels in 1) above.

3) The OnChartEvent() function always reports the mouse event for OBJ_LABEL items which are behind the buttons. I want to capture the mouse events for buttons but to no avail.

Could anyone shed some light in the event handling model in MQL5? Is there a solution to allow me to capture the mouse events for objects in front of all the others?

Thanks and regards,

Robin Ngoui  

Reason: