Morph Q's on alignment and text editing
Ross Boylan
RossBoylan at stanfordalumni.org
Thu Apr 26 18:12:29 UTC 2001
Thanks. That did the trick. I just copied wantsKeyboardFocusFor: to my
class. This makes it a little harder to get at the menu, but I'm guessing
that if I hook into the UpdatingStringMorph's event handler I can make
that work too.
At 10:09 AM 4/26/01 -0700, you wrote:
>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
|