theLW "remembers" previous action?

To all

I am debugging a simple a programme I created which uses a UI Styler GUI. It works as intended (it seems!) but while "playing" with what-if the user does this.. I noticed that by closing the GUI (using the cancel button) and re-launching the program (i.e. the GUI) to re-run it the listing window (theLW) still has all the previous messages (i.e. the previous run). While it is actually useful I'd like to know if there is a way of "wiping clean" theLW when I close it?

The cancel_cb() call back has the following lines

theLW.WriteLine ("End of macro...")
theLW.WriteLine ("-----------------------------------")
TheLW.Close()
'Wait for 1 sec so that the user can read the lines above 1000ms (1 sec)
System.Threading.Thread.CurrentThread.Sleep(1000)
TheLW.CloseWindow()

Thanks
Regards
JXB