[BUG] Morphic layout advice sought
Craig Latta
Craig.Latta at NetJam.ORG
Mon Feb 4 22:29:56 UTC 2002
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
|