In this example the text of the labels are re-drawn and overlay each other when pressing the button. Is there a possibility to clear the layout mGridLayout before calling Initialize()? Or is the only solution to save the labels globally and simply set the text instead of creating them each time?
Globally will not be necessary. Keep pointers to the labels in your class and update the text when necessary.
Horse sense is the thing that keeps horses from betting on people. --W.C. Fields
Bookmarks