How to catch click on calculator buttons?
Event ButtonClick fires only when I click on button which pops up the calculator. All other clicks (+, *, 0, 1, 2,…) do not fire ButtonClick
CalcEdit button click event
Answers approved by DevExpress Support
Hello,
You can use the GetPopupEditForm method to get the current PopupCalcEditForm form. All buttons are in the Controls collection:
C#calcEdit1.Popup += CalcEdit1_Popup;
private void CalcEdit1_Popup(object sender, EventArgs e)
{
foreach(var control in calcEdit1.GetPopupEditForm().Controls)
if(control is SimpleButton button)
{
button.Click -= Button_Click;
button.Click += Button_Click;
}
}
I have recorded a video to illustrate this approach. Please try it and let me know if this solution suits you.