Hi MailList wxHaskell user:
I am new to wxhaskell.
In reading examples and writing my test program, I need some help about Layout controls.
Reading wxhaskell/samples/wx/Layout.hs, here is the code piece.
> set f [defaultButton := ok
> ,layout := container p $
> margin 10 $
> column 5 [boxed "coordinates" (grid 5 5 [[label "x:", hfill $ widget xinput]
> ,[label "y:", hfill $ widget yinput]])
> ,floatBottomRight $ row 5 [widget ok,widget can]]
I donot know why there must be an container p out of the layout of the controls. I
have tried remove the container, after that, the text boxes and buttons dispeared. Why ?
In my test, I have written a piece of code like this.
> set f [layout := column 2 [hfill $ row 1 [hfill $ label "Left"
> ,vfill $ vrule 2
> ,hfill $ label "Right"]
> ,hfill $ hrule 1
> ,floatCenter . margin 1 . grid 5 5 $
> map (\i -> map (label . show) [i..(i+5)]) [1..5]
In the above code, the frame f has a status bar. I have two questions about it.
My purpose of the top row, is to make these two labels in the same width, which
the above code does not. How to achieve the purpose ?
Resizing the window, when it is very small, the label grid may out of the bound.
How to deal with it ?
My system / env.:
WinXP Pro SP3 + GHC 6.10.1 + wxHaskell 0.11.0
I suppose the first question and the third question are the same. Not so sure.
Anyway, thanks for your reading through.