As a learning exercise, I'm writing an outliner in morphic (using 3.8-6665on WinXP).
For some reason I am unable to make the PasteUpMorph fill the size of the containing widget and have to resize it manually.
To build it, I create a SystemWindow, add a ScrollPane, and then add a PasteUpMorph. I tried setting the PasteUpMorph's hResizing to #spaceFill, but no go. I tried sending layoutChanged to everyone in the chain, but that didn't help either.
Should I be using a different morph for this?
As a side note, I've noticed that GeeMailMorph exhibits this same behavior.
Steve Greenberg wrote:
As a learning exercise, I'm writing an outliner in morphic (using 3.8-6665 on WinXP).
For some reason I am unable to make the PasteUpMorph fill the size of the containing widget and have to resize it manually.
If I understand your problem correctly then you can try to look at this.
http://minnow.cc.gatech.edu/squeak/3875
There are some examples which might interest you.
To build it, I create a SystemWindow, add a ScrollPane, and then add a PasteUpMorph. I tried setting the PasteUpMorph's hResizing to #spaceFill, but no go. I tried sending layoutChanged to everyone in the chain, but that didn't help either.
Should I be using a different morph for this?
As a side note, I've noticed that GeeMailMorph exhibits this same behavior.
Regards
Thanks for the response. The problem, however, is that in these examples I am forced to manually set the extents of the PasteUpMorph. I simply want to to tell it to fill its container window and be done with it.
Again, perhaps I'm using the wrong morph for the job. I want to display a vertically scrollable list of text morphs. The width of the text morphs should resize with the container window (as the single one does in a SystemWindow). I chose PasteUpMorph as the container for the texts, and they act as I want them to. The problem is getting the PasteUpMorph itself to follow the outlines of its own parent.
On 9/25/05, Matej Košík kosik@fiit.stuba.sk wrote:
Steve Greenberg wrote:
As a learning exercise, I'm writing an outliner in morphic (using 3.8-6665 on WinXP).
For some reason I am unable to make the PasteUpMorph fill the size of the containing widget and have to resize it manually.
If I understand your problem correctly then you can try to look at this.
http://minnow.cc.gatech.edu/squeak/3875
There are some examples which might interest you.
To build it, I create a SystemWindow, add a ScrollPane, and then add a PasteUpMorph. I tried setting the PasteUpMorph's hResizing to #spaceFill, but no go. I tried sending layoutChanged to everyone in the chain, but that didn't help either.
Should I be using a different morph for this?
As a side note, I've noticed that GeeMailMorph exhibits this same
behavior.
Regards
Matej Košík
Steve: I always used the same technic what Matej before, only variation could be embed into Morph first as in:
BigWindow ³ You wish really big complex scrolling Morphs ? ³ | fondoA t aWindow m p s | fondoA := Morph new. fondoA extent: 10000 @ 10000. fondoA color: Color paleYellow. t := TwoWayScrollPane new. t scroller addMorph: fondoA. aWindow := (SystemWindow labelled: 'Squeak - Mapa de Clases') model: nil. aWindow bounds: (fondoA position - (0 @ aWindow labelHeight + aWindow borderWidth) corner: fondoA bottomRight + aWindow borderWidth). aWindow addMorph: t frame: (0 @ 0 extent: 1 @ 1). aWindow color: Color paleOrange. aWindow openCenteredInWorld. p:= 0@0.
99 timesRepeat: [m := Morph new. m extent: 100 @ 100. m position: p. p := p + (100 @ 100) asPoint. s := StringMorph new. s contents: p asString. m addMorphCentered: s. fondoA addMorph: m]. ^fondoA.
But searching morphic building examples in image , I think you should look at: NebraskaServerMorph
Hope this help.
Edgar
Steve Greenberg wrote:
Thanks for the response. The problem, however, is that in these examples I am forced to manually set the extents of the PasteUpMorph. I simply want to to tell it to fill its container window and be done with it.
Again, perhaps I'm using the wrong morph for the job. I want to display a vertically scrollable list of text morphs.
The closest ready to use morph is perhaps some kind of PluggableListMorph.
There was a demo http://minnow.cc.gatech.edu/squeak/2962 Its appearance looks weird because it was created for older squeak plugin image, but AFAIK it is functional. Should be updated, though.
Are you really sure you need not PluggableListMorph? (It does not do exactly what you need, but maybe you can perhaps do things you wanted to do a bit differently.)
The width of the text morphs should resize with the container window (as the single one does in a SystemWindow). I chose PasteUpMorph as the container for the texts, and they act as I want them to. The problem is getting the PasteUpMorph itself to follow the outlines of its own parent.
On 9/25/05, Matej Košík kosik@fiit.stuba.sk wrote:
Are you really sure you need not PluggableListMorph? (It does not do exactly what you need, but maybe you can perhaps do things you wanted to do a bit differently.)
Am I sure? Heck no! I haven't the slightest idea how these dozens of morphs fit together or which should be used for what. I'm still figuring all of that out.
Thanks for the advice, I'll definitely check out PluggableListMorph.
squeak-dev@lists.squeakfoundation.org