Morph Q's on alignment and text editing

Ned Konz ned at bike-nomad.com
Thu Apr 26 17:09:16 UTC 2001


On Thursday 26 April 2001 09:40, Ross Boylan wrote:
> Thanks to the advice I have the alignment and display fixed up.  However,
> I'm still unable to edit the text.  Also, overriding
> #addCustomMenuItems:hand: doesn't do anything--I suspect for the same
> reason, lack of focus.

Use an AlignmentMorph rather than a RectangleMorph as the parent. Look at 
wantsKeyboardFocusFor: (one of the few differences between an AlignmentMorph 
and a RectangleMorph). You'll also probably have to set color: and 
borderWidth: to make it look like your Rectangle. And you may not want to use 
#shrinkWrap for hResizing, as your size may grow with the UpdatingStringMorph.

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com





More information about the Squeak-dev mailing list