When I override Onclick on RadButton, the code first finishes the whole onclick method before firing base.OnClick.
For a standard Button, this works fine.
In the example below, the OnClick will first finish completely before the base.OnClick will be executed, but is should not.
How to fix this ?
public class QButton : RadButton
{
protected override void OnClick(EventArgs e)
{
var form = FindForm();
try
{
// set wait cursor
form.Cursor = Cursors.WaitCursor;
// execute base click code
base.OnClick(e);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
// set arrow cursor
form.Cursor = Cursors.Default;
}
}
}
For a standard Button, this works fine.
In the example below, the OnClick will first finish completely before the base.OnClick will be executed, but is should not.
How to fix this ?
public class QButton : RadButton
{
protected override void OnClick(EventArgs e)
{
var form = FindForm();
try
{
// set wait cursor
form.Cursor = Cursors.WaitCursor;
// execute base click code
base.OnClick(e);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
// set arrow cursor
form.Cursor = Cursors.Default;
}
}
}