Reputation: 49
When I click in my richTextBox, I run this code to make my textbox bigger for the user:
this.richTextBox1.Size = new System.Drawing.Size(500, 100);
Now I want any click after clicking my richTextBox to change the size back to the original:
this.richTextBox1.Size = new System.Drawing.Size(477, 26);
I can use the code above for each element mouse click event, but I am wondering if there is an easier way.
Upvotes: 1
Views: 58
Reputation: 37358
Just write the first code in richtextbox.enter
event. And the second in richtextbox.leave
event. Otherwise MouseClick
is not a bad idea
Upvotes: 1