Design vs Code (e.g. components, instances, etc)

I have the same question still can’t find the answer anywhere. I have recently been moving off of the Design view and moving towards using code for everything, but I have existing forms that I created in Design view. For example, if I were to programmatically create a button, I’d create this in the init statement:

self.button_1 = Button(text=“Submit”)
self.add_component(self.button_1)

If I added a button in Design view, that code does not show up in the init statement of my code. Is that code written somewhere else?