Answer the question
In order to leave comments, you need to log in
C#. How to pass button text to ButtonClick?
Good afternoon.
Can you please tell me how to pass the button text to ButtonClick?
There is a roombut button, with a text property.
It is necessary to pass this text to the button click event for further processing.. But I don’t understand how to do it correctly.. Thank you in advance!
roombut.Text = "Текст";
roombut.Click += new System.EventHandler(this.ButtonClick);
void ButtonClick(object sender, EventArgs e)
{
this.panel1.Visible = true;
}
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