Tuesday 15 July 2014

C#: What is the proper way to swap winform controls? -


What is the correct way to change a winform element with any other element when a trigger is made? For example, I would like to change a button and a single dimension with a text box in the same situation.

If you (for some reason) do not just want to change your visibility, You can add and remove them from the control archive.

  // Fictional example ... Private Zero Swap (Add to Control, Remove to Control) {This. Control. Remove (toRemove); this. Control. Add (toAdd); }  

No comments:

Post a Comment