My google-fu has failed me. How can I remove widgets that I've added to a Panel ()
? For example, in the following, I want the controls
-panel to become empty again.
buildGUI = do
f <- frame [ text := "Hello" ]
controls <- panel f []
ctext <- staticText controls [ text := "Foo" ]
set controls [ layout := margin 5 (widget ctext) ]
set f [ layout := widget controls ]
{- delete ctext ? How? -}
return ()
(I'm trying to build a dynamic GUI, and I need to get rid of the old controls when it updates).