?? mainsimplebutton.hs
字號:
{- "Goodbye" demo as discussed on the Haskell mailing list. Specification: pops up a window saying "Hello World" and presenting a button saying "Bye". Clicking the button once changes the message to "Goodbye"; clicking it a second time causes the program to quit. -}module Main whereimport Computationimport Eventsimport HTkmain = do mainWin <- initHTk [text "Hello World"] label <- newLabel mainWin [text "Hello World"] button <- newButton mainWin [text "Bye"] pack label [] pack button [] buttonClicked <- clicked button sync buttonClicked label # text "Goodbye" sync buttonClicked destroy mainWin
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -