[Haskell-beginners] Trouble with layout in wxHaskell

Nathan Hüsken nathan.huesken at posteo.de
Wed Aug 14 17:03:48 CEST 2013


Hey,

I am trying to understand how do a layout in wxHaskell. I am trying to 
make a frame with 2 text entries. One single lined at the top and one 
multiline below it. Both should expand with the window size horizontal. 
When the window is expanded vertical, only the multiline text entry 
should expand.

Her is what I wrote:

   main = start mainFrame

   mainFrame = do
     f        <- frame [text := "BiVision"]
     buffer   <- textEntry f []
     mainArea <- textCtrl  f []
     set f [layout := expand $ column 2 [hstretch $ widget buffer, 
stretch $ widget mainArea]]

This gives me a window with the desired controls. But they are not 
expanding.
Why?
I tried different combinations of expand and stretch (I do not really 
understand the difference?). But nothing works.

I am guessing there is something simple I do not yet understand :).

Thanks for any help!
Nathan




More information about the Beginners mailing list