Change button name in event

Asked

Viewed 315 times

0

I was making a change to the name of the buttons in the project and accidentally clicked twice on the button, so he opened the code, as the variable opened the code with the name button7.

As I had made some changes I decided to save the project before anything else went wrong. So far so good, and then went there in the properties of the button to rename and renamed to btnSair only that in the event did not change to btnSair continues as button7 in the event..

Could someone give a help to make the change also in the event ? It would be possible to just rename and refactor?

  • Enter the button event and do the procedure that friend @Christian Beregula passed below. To avoid any further inconvenience use the right button by selecting the one you want to rename and select the option Refactor then click on Rename simply rename to the desired name.

2 answers

3

Just go on the tab eventos from your button and find the event click, and put the name you want, and then modify the event name in your code to leave it equal.

  • 1

    right-click on what you want to rename use the option Refactor then click on Rename simply rename to the desired name

2

If this is your case, you can simply delete the control button and then delete the event, before, save the code not to be deleted together. After you do this, create again the control button and group rename it to whatever you want and double click.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.