Re: [wxhaskell-users] horizontal stretch bug??

2007-01-17 Thread Eric Y. Kow
Hi Conal,

On Tue, Jan 16, 2007 at 00:22:16 -0800, Conal Elliott wrote:
 I'm stumped on a problem with horizontal stretching, and I don't know
 whether I've hit a bug or my own ignorance.  I want to place two sliders
 horizontally and have them both stretch with the frame.  Instead, the left
 one stretches, and the right one doesn't.

I ran your code both under MacOS X and Linux, and they both seem to
expand the sliders symetrically.  Maybe this is a Windows-specific
issue?  Could somebody else try the code?

-- 
Eric Kow http://www.loria.fr/~kow
PGP Key ID: 08AC04F9 Merci de corriger mon français.


pgpiJOOa4tV5R.pgp
Description: PGP signature
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


[wxhaskell-users] horizontal stretch bug??

2007-01-16 Thread Conal Elliott

I'm stumped on a problem with horizontal stretching, and I don't know
whether I've hit a bug or my own ignorance.  I want to place two sliders
horizontally and have them both stretch with the frame.  Instead, the left
one stretches, and the right one doesn't.  (I'm not sure I have stretch
and expand clear in my mind.  The right slider gets more space but doesn't
fill it up.)  One example of this behavior is at
http://conal.net/phooey/images/ui3.png.  I've also included below a simple,
self-contained example.  I'd like to get this behavior fixed in two
wxhaskell-powered libraries I'm about to release.

I'm using row to get the horizontal juxtaposition, and hfill.widget for
the slider layouts.  I'd sure appreciate help from someone who knows about
wxHaskell layout.

Thanks, - Conal



import Graphics.UI.WX

main = runWio ssBeside

type Wio = Panel () - IO Layout

-- Simple slider
sslider :: Wio
sslider w = do ctl - hslider w True 0 10 []
  return (hfill (widget ctl))

ssBeside :: Wio
ssBeside w = do la - sslider w
   lb - sslider w
   return (row 0 [la,lb])


-- Run a 'Wio': handle frame  widget creation, and apply layout.
runWio :: Wio - IO ()
runWio wio = start $
 do  f- frame [visible := False]
 pan  - panel f []
 l- wio pan
 set pan  [ layout := l ]
 set f[ layout := hfill (widget pan), visible := True ]
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users