From: carlos g. <car...@gm...> - 2011-05-31 22:05:23
|
I don't understand too. Looks like some misterious thing is happening. But you can use the 'mimsize' layout funcion from WXCore in order to get what you want. Here the code: module Main where import Graphics.UI.WX main::IO() main = start gui gui :: IO () gui = do f <- frame [text := "timer"] panel <- panel f [clientSize := sz 200 100] hr <- textEntry panel [ text := "hour" , clientSize := sz 10 10 ] min <- button panel [ text := "min" , clientSize := sz 10 10 ] sec <- textEntry panel [ text := "sec" , clientSize := sz 10 10 ] -- layout set panel [layout := margin 10 $ row 1 [ minsize (sz 10 10) $ widget hr , widget min , minsize (sz 10 10) $ widget sec ] ] set f [layout := widget panel] On 30 May 2011 05:49, 诺铁 <no...@gm...> wrote: > Hi, > I am learning wxHaskell,and trying to create a small timer app. I > don't understand why in following code ,clientSize only affect button > control > > module Main where > > import Graphics.UI.WX > > main::IO() > > main = start gui > > gui :: IO () > > gui = do > > f <- frame [text := "timer"] > > panel <- panel f [clientSize := sz 200 100] > > hr <- textEntry panel [text := "hour",clientSize := sz 10 10] > > min <- button panel [text := "min",clientSize := sz 10 10] > > sec <- textEntry panel [text := "sec",clientSize := sz 10 10] > > -- layout > > set panel [layout := margin 10 $ row 1 [widget hr,widget min,widget sec]] > > set f [layout := widget panel] > > > > ------------------------------------------------------------------------------ > Simplify data backup and recovery for your virtual environment with > vRanger. > Installation's a snap, and flexible recovery options mean your data is > safe, > secure and there when you need it. Data protection magic? > Nope - It's vRanger. Get your free trial download today. > http://p.sf.net/sfu/quest-sfdev2dev > _______________________________________________ > wxhaskell-users mailing list > wxh...@li... > https://lists.sourceforge.net/lists/listinfo/wxhaskell-users > > |