[BUG] Morphic layout advice sought
Andreas Raab
Andreas.Raab at gmx.de
Tue Feb 5 11:10:05 UTC 2002
Craig,
The answer is in PolygonMorph; watch what happens when you do:
((PolygonMorph new)
bounds: (0 at 0 extent: 100 at 100)) openInWorld
It's bounds are nowhere close to 0 at 0 - 100 at 100 so if you replace the
line morph with something else it'll work.
Cheers,
- Andreas
> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On
> Behalf Of Craig Latta
> Sent: Monday, February 04, 2002 11:30 PM
> To: Bob Arning; John Maloney; Andreas Raab; Ted Kaehler
> Cc: the Squeak list
> Subject: [BUG] Morphic layout advice sought
>
>
>
> Hi--
>
> I may be experiencing bugs with Morphic layout, or I
> might just be
> composing things incorrectly. I've read the active tutorial
> that Ted and
> Andreas wrote. I'd appreciate any advice...
>
> Below is a simplified example of something I'm trying
> to do, nesting a
> proportional layout in a table layout. When I evaluate the expression,
> the resulting composite morph has a line which doesn't span its parent
> morph, despite its space-filling horizontal resizing directive. When I
> then resize the composite morph, it gradually corrects the
> layout, over
> the course of several mouse motion events. :) After that, the layout
> sometimes becomes incorrect during resizing, depending on how fast I
> move the mouse! Try it and see how the colored morphs sometimes don't
> line up correctly.
>
> Eventually I'd like to compose a morph with a scrollbar
> below, and a
> painting canvas with a drawing of some axes overlaid above.
>
>
> thanks!
>
> -C
>
> ***
>
> (Morph new)
> color: Color green;
> extent: 300 @ 300;
> layoutPolicy: TableLayout new;
> listDirection: #bottomToTop;
> addMorphBack: (
> (Morph new)
> color: (Color blue alpha: 0.5);
> extent: 100 at 100;
> hResizing: #spaceFill);
> addMorphBack: (
> (Morph new)
> color: (Color red alpha: 0.5);
> hResizing: #spaceFill;
> vResizing: #spaceFill;
> layoutPolicy: ProportionalLayout new;
> addMorph: (
> (Morph new)
> color: (Color yellow alpha: 0.5);
> hResizing: #spaceFill;
> vResizing: #spaceFill;
> layoutPolicy: TableLayout new;
> listDirection: #topToBottom;
> listCentering: #center;
> addMorph: (
> (
> LineMorph
> from: 0 @ 0
> to: 100 @ 0
> color: Color black
> width: 2
> )
> hResizing: #spaceFill))
> fullFrame: (LayoutFrame fractions: (0 at 0 corner: 0.9 @ 0.9)));
> openInWorld
>
> ***
>
> --
> Craig Latta
> composer and computer scientist
> craig.latta at netjam.org
> www.netjam.org
> crl at watson.ibm.com
> Smalltalkers do: [:it | All with: Class, (And love: it)]
>
More information about the Squeak-dev
mailing list
|