Events on MQL5 Panel reacting slower (with delay)

 

Hello,

I have same panel on MQL4 and MQL5. On MQL4 the elements react very fast, for example the dropdown menu opens immidiatelly on mouse click. But on MQL5 same panel is much slower. It can take up to 1-2 seconds after mouse click. What is the reason and how can it be fixed?

Regards,

Dmitro

 
Which panel? Examples of the panel in the editor: [data folder] \ MQL5 \ Experts \ Examples \ Controls \ and in the help: Panels and Dialogs
Documentation on MQL5: Standard Library / Panels and Dialogs
Documentation on MQL5: Standard Library / Panels and Dialogs
  • www.mql5.com
Panels and Dialogs - Standard Library - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Vladimir Karputov:
Which panel? Examples of the panel in the editor: [data folder] \ MQL5 \ Experts \ Examples \ Controls \ and in the help: Panels and Dialogs

Exactly , it is CDialog Panel. I have created  it first in MQL4. It works fine in MT4, very fast. Then I compiled it in MQL5 (same code, but adjusted to MQL5). And I see that in MT5 the elements react with small delay (1-2 seconds). Mouse click on buttons, comboboxes etc... always some delay. I do not understand why... and how to fix?! 

 
Fixed by using ChartRedraw() on Events.
 
Dmitry Zhakov :
Fixed by using ChartRedraw() on Events.

Perhaps you misspelled your panel? In the panel you DO NOT need to do ChartRedraw () :).

I have provided links above to the correct panels. Run these examples. After that, tell us what you did.

 


Dmitry Zhakov, 2021.04.16 18:30

Hello,

I have a panel (CPanel) above the chart. When I click mouse on panel, sometimes it interracts with the chart behind the panel. So it can happen that the chart moves, while I operate with mouse on my panel. How to avoid it?


Regards,

Dmitro


Reason: