[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/
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
Alexandre Rousseau wrote:
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.
Does not #spaceFill do just fill the max available space ?
Karl
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
The owner morph (a stickie note title bar) contains 3 submorphs: 1. a SimpleButtonMorph, to trigger collapse/expansion of the stickie note (collapsed = stickie note's editor submorph hidden) 2. a StringMorph: contains a summary -- a contracted copy -- of the stickie note's editor's contents. The length of that summary depends on the maximum amount of horizontal space available to the containing StringMorph. 3. a StringMorph: set to the last modification date of the stickie note.
Therein lies my problem: to determine the maximum space that #2 can occupy before provoking a resize of the stickie note, and given that stickie note widths are left to user discretion, i.e., vary.
Alex
On 28-Nov-07, at 9:19 PM, karl wrote:
Alexandre Rousseau wrote:
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.
Does not #spaceFill do just fill the max available space ?
Karl
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
Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
How to I prevent an embedded TextMorph from wrapping the text I enter into it if said text exceeds the current bounds of that morph, despite the fact that its much-larger owner gives it ample expansion room via the "hResizing: #spaceFill" selector?
I've tried a gazillion (minus one?) layout, autoFit, and wrapFlag setting combos to no avail: that little son-of-a-... morph keeps wrapping its text as soon as entry has exceeded the current bounds.
Thanks, again Alex
beginners@lists.squeakfoundation.org