Change button name in event

0

I was making a change in the name of the buttons in the project and accidentally double clicked the button, hence it opened the code, as it had not renamed the variable opened the code with the name button7.

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

Could someone give help to make the change also in the event? Is it possible to just rename and refactor?

    
asked by anonymous 01.02.2018 / 17:33

2 answers

3

Just go to the eventos button of your button and find the event click , and put the name you want, and then modify the name of the event in your code to make it equal.

    
01.02.2018 / 17:58
2

If this is your case, you can also just delete the control button and then delete the event, rather, save the code so it will not be deleted together. After you do this, re-create the button control and agr rename it to whatever you want and double-click.

    
01.02.2018 / 19:28