Hi Jerome

Thanks for your advice. The parent morph in question is variable in width (user discretion), includes several submorphs, including that for which I would like to calc the maximum "non-impacting" extent, and uses a layoutPolicy. And yes, that parent has insets... set, too. So I am a bit hesitant. Will try some stuff.

Thanks again
Alex


On 28-Nov-07, at 4:15 PM, Jerome Peace wrote:

[Newbies] How do I find out the maximum extent that a
morph can be set to, without this impacting the
current extent of its owner morph?


Hi Alexandre,


My first guess would be:

maxBounds := myMorph owner bounds
myMorph bounds: maxBounds.

and my second guess would be:
necessaryInset := 1
maxBounds := maxBounds insetBy: necessaryInset .

and try for a third guess:
necessaryInset := necessaryInset  + 1 .

etc.

And I would use a squeak workspace to find out what I
needed to know. And then I would know it. (Report back
here you results)

Cheers.

Yours in curiosity and service, --Jerome Peace


***

Alexandre Rousseau alexr at mailsnare.net
Wed Nov 28 05:27:28 UTC 2007

Hi all

Question: How do I find out the maximum extent that a
morph can be
set to, without this impacting the current extent of
its owner morph?
Context: trying to set the extent of a sticky note's
summary label to
the maximum possible width, and such that the note's
window (isKindOf
PasteUpMorph) will not be resized.

Thanks in advance
Alex

==
Alexandre Rousseau
E: alexr at mailsnare.net
NinerPaint: http://www.ninerpaint.com
***




______________________________________________________________________ ______________
Be a better pen pal.
Text or chat with friends inside Yahoo! Mail. See how. http:// overview.mail.yahoo.com/
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to