At one place in my app, I want in effect to replace one control with another. For example: I have a popupmenu that is populated with a list of nicknames. The user can select one and the app then displays information about that nickname.
The user can also click a “new” button to create a new nickname. In that case, I want to replace the popupmenu with a textfield into which the user will type the name of the new nickname. So far I’ve been managing just by layering the controls almost but not quite on top of each other. I can then swap the visibility of the two controls to go from one to the other. I discovered that a control completely hidden by another seems to get grouped with it, somehow.
What is the best solution here? Should I move all such controls out of the window in the IDE, and then at runtime modify their Left property to bring them back on? What do other people do here?