{-# OPTIONS -Wall #-}
{-
Shows a composite widget containing a listbox and a button. The button
deletes the currently selected item.
Besides the composite widget, the GUI contains two buttons. One for
enabling the composite, and for disabling the composite. These buttons
shows that the composite remembers the enabledness of its child
widgets. That is, even though we press the enable-button, if the
widget has internally disabled some widget it stays disabled.
The enaabledness feature is easier to experience than to explain. Thus
you should try running the example and see for yourself. First try to
hit the "Outer enable" and "Outer disable" -buttons without selecting
any items. Then try pressing the buttons while some item is selected.
-}
module Main
where
import Graphics.UI.WX
import Graphics.UI.WXCore
import Composite
main :: IO ()
main = start $
do w [Prop MyList] -> IO MyList
myList = compose $ \p ->
do ls do s