|
From: Abraham E. <abe...@gm...> - 2004-08-02 19:07:10
|
I'm a newb to both wxHaskell and wxWindows, so I apologize if I've
missed something obvious.
The following program constructs a trivial menu and submenu; the
command for the non-submenu item works but the one for the submenu
item does not. This was tested under debian unstable, with wxHaskell
0.8 and wxGTK 2.4.2.
Abe
import Graphics.UI.WX
main = start gui
gui =
do f <- frame [text := "Submenu test", visible := False]
m <- menuPane [text := "Menu"]
sub <- menuPane []
test <- menuItem sub [text := "Test", on command := putStrLn
"Test"] -- doesn't work
menuSub m sub [text := "Submenu"]
menuItem m [text := "Test 2", on command := putStrLn "Test 2"] -- works
set f [menuBar := [m]]
focusOn f
set f [visible := True]
|