CPanel: Transfer OnTick and OnchartEvent to textbox

 

I am trying to build a Panel that will show the current Spread and the CandleSize of a specific candle on mouse click.

I made the calculation for Spread in OnTick and CandleSize in OnChartEvent.

Can someone please advise how to transfer the calculated value of Spread and CandleSize in textboxes (Spread_Edit and CandleSize_Edit respectively)

Files:
My_Panel.mq4  10 kb