【发布时间】:2016-07-27 10:41:19
【问题描述】:
我在haskell 中有一个小程序,使用wxhaskell。它显示一个带有面板的窗口,其中包含一些图纸。问题是窗口缩小到非常小的尺寸,我必须用鼠标将其展开。
如何正确定义尺寸?
这是我的程序:
module Main where
import Graphics.UI.WX
import Graphics.UI.WXCore
main :: IO ()
main
= start hello
hello :: IO ()
hello = do
f <- frame [text := "HELLO!"]
sw <- panel f [ on paint := onpaint]
set f [clientSize := sz 300 300,
layout := fill $ widget sw]
return()
where
onpaint dc pnel = do
circle dc (pt 200 200) 20 [penKind := PenDash DashDot]
drawPoint dc (pt 200 200) []
谢谢。
【问题讨论】:
标签: user-interface haskell wxwidgets wxhaskell