how to??? TextMorph and Alignment
Nicholas Bennett
nicholasjbennett at hotmail.com
Thu Feb 9 21:40:47 UTC 2006
I am trying to construct a small GUI interface to add text items to a list
of text items.
I found that TextMorph seemed to have the capabilities I wanted in that it
could accept focus and give an insertion cursor and you can get and set the
characters.
If I do 'TextMorph borderedPrototype openInHand' I get that 'nice' behaviour
in a free floating morph.
If I make an AlignmentMorph (to contain it and the list) and drop the above
TexstMorph it continues to work fine (you can type in it).
If I programatically construct the AlignmentMorph and insert a new TextMorph
and then open the containing Alignment, like:
|a|
a := AlignmentMorph newRow; extent: 200 at 200.
a addMorph: TextMorph borderedPrototype.
a openInHand
then the TextMorph will not 'take' an insertion cursor and seems
'dead'/'deaf' to the mouse.
what am I doing wrong?
should I use something other than TextMorph?
am I constructing the Alignment ok?
does anyone have a good example of something similar I can look at to gain
understanding
regards,
nicholas
More information about the Squeak-dev
mailing list
|