我正在尝试填充文本条目以填充整个宽度,如果将条目直接放入框架中,这可以正常工作,但如果将它们放入面板中,它们会恢复为默认大小。“盒装”布局组合器文本也消失了。我究竟做错了什么?
import Graphics.UI.WX
main = start gui
gui = do
f <- frame []
p <- panel f []
xcoord <- entry p []
ycoord <- entry p []
set p [layout := fill $ boxed "foo" $
grid 5 5 [
[floatRight $ label "x coordinate", hfill $ widget xcoord]
, [floatRight $ label "y coordinate", hfill $ widget ycoord]
]
]
set f [layout := fill $ container p glue]