如何更改gtk中Button的位置?在ButtonClass的文档中,我找不到任何方法。 (我正在尝试在Haskell中学习GUI)
import Graphics.UI.Gtk
import Data.IORef
main = do
initGUI
window <- windowNew
button <- buttonNew
value <- newIORef 0
set window [ containerBorderWidth := 10,
containerChild := button ]
set button [ buttonLabel := "Hello World" ]
onClicked button $ callback2 button
onDestroy window mainQuit
widgetShowAll window
mainGUI
callback2 :: ButtonClass b => b -> IO ()
callback2 b = do
--Change Button pos