[Pharo-project] aligning morphs
gazzaguru2 at btinternet.com
Mon Jan 10 10:50:57 EST 2011
I may get time later in the week to have a go with GeneralScrollPane to
support the feature you desire... ;-)
----- Original Message -----
From: "Tudor Girba" <tudor.girba at gmail.com>
To: <Pharo-project at lists.gforge.inria.fr>
Cc: <Pharo-project at lists.gforge.inria.fr>
Sent: Monday, January 10, 2011 2:23 PM
Subject: Re: [Pharo-project] aligning morphs
Thanks for the reply.
So, what would be required for scrollbars to work with spaceFill? I would
really need this feature, but I do not know how to go about it.
Could you or anyone else provide some hints? Of course code would be even
better. But at this moment hi ts would be helpful, too :)
On Jan 10, 2011, at 13:04, "Gary Chambers" <gazzaguru2 at btinternet.com>
> Hi Doru,
> #spaceFill constraints are typically only used by table layouts.
> ScrollPane is designed for fixed size contents, at present.
> Might be nice to extend it to honour any #spaceFill of its single target
> This would simplify usage of scrollers quite a bit!
> Regards, Gary
> ----- Original Message ----- From: "Tudor Girba" <tudor.girba at gmail.com>
> To: "Pharo-project at lists.gforge.inria.fr Development"
> <pharo-project at lists.gforge.inria.fr>
> Sent: Saturday, January 08, 2011 1:22 AM
> Subject: [Pharo-project] aligning morphs
> I would need help with understanding the magic behind alignment in
> Take the example from below. Could anyone help me with what I should do to
> have the morph stretch all the way horizontally?
> | scroll window morph |
> scroll := ScrollPane new.
> fillStyle: (SolidFillStyle color: Color blue);
> vResizing: #spaceFill;
> hResizing: #spaceFill.
> morph := PanelMorph new.
> fillStyle: (SolidFillStyle color: Color yellow);
> listDirection: #topToBottom;
> vResizing: #shrinkWrap;
> hResizing: #spaceFill;
> layoutInset: 10.
> morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
> scroll scroller addMorph: morph.
> window := SystemWindow new.
> window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0 corner:
> 1 @ 1)).
> window openInWorld
> "Every thing should have the right to be different."
More information about the Pharo-dev