Problems with aligning Morphs

Tim Rowledge tim at sumeru.stanford.edu
Tue Sep 18 21:09:20 UTC 2001


Ned Konz <ned at bike-nomad.com> is widely believed to have written:

> On Monday 17 September 2001 06:56 pm, Tim Rowledge wrote:
> 
> > If you put a TextMorph in a frame in a SystemWindow, it does not seem to
> > want to play nice - the frame you get is not what you asked for. Oh, and
> > its invisible (the text) since the colour is set to transparent! 
> 
> There is a TextMorph subclass called ShowEmptyTextMorph that was created 
> apparently just to deal with this problem.
Doesn't do me any good though; in fact it seems to be completely
invisible as opposed to partially!. In fact, I can actually select the
invisible text, but the frame is not displayed.

example code:-
"sys _ SystemWindow labelled: 'foo'.

sys addMorph: (TextMorph new contents: 'path to hell' asText allBold)
fullFrame: (LayoutFrame fractions: (0 at 0 corner: 0.3 at 0) offsets: (0 at 20
corner: 0 @100)).

sys openInWorld"

Note a couple of rather annoying things:-

a) the window is displayed very oddly. If you substitute
	sys _ (SystemWindow labelled: 'foo') model: 1.
you get a more resonable window display.

b) the textmorph seems to ignore resizing of the window, instead of
shrinking/growing as expected. I've tried a few variations on the layout
frame parameters. No difference I can uncover. If you put the textmorph
in an alignment morh, the frame appears ok and grows/shrinks, but
the text morph will overrun the frame as soon as you make it too small.

I can't help feeling that some things are really pretty badly screwed up
right now.

tim
-- 
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
To define recursion, we must first define recursion.





More information about the Squeak-dev mailing list