Answer the question
In order to leave comments, you need to log in
How to properly attach the DoubleClick event to a button in windows forms?
Doesn't handle the double click event, but just click works.
here is the handler:
private void anyButton_DoubleClick(object sender, MouseEventArgs e)
{
MessageBox.Show("azaza");
}
cells[i, j].MouseUp += new MouseEventHandler(anyButton_Click); // работает
cells[i, j].MouseDoubleClick += new MouseEventHandler(anyButton_DoubleClick); // не работает
cells[i, j].DoubleClick += new MouseEventHandler(anyButton_DoubleClick); // не работает
private void anyButton_DoubleClick(object sender, EventArgs e)
{
MessageBox.Show("azaza");
}
cells[i, j].DoubleClick += anyButton_DoubleClick;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question