[Cuis-dev] adding functionality to morphs

Mark Volkmann r.mark.volkmann at gmail.com
Thu Aug 22 18:34:19 PDT 2024


The issue I've run into with TextModelMorph is that it seems to be for
multi-line input.
Is there a way to configure it to only allow a single line of input like
TextEntryMorph does?

On Thu, Aug 22, 2024 at 3:17 AM Hilaire Fernandes via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> What about listening to key stroke event on TextModelMorph. TextEntryMorph
> is a bit limited in its features. Code example from DrGeo:
>
>     tMorph scroller
>         setProperty: #keyStroke:
>         toValue: [:event |
>             tMorph scroller acceptContents.
>             self changed: #isReadyToApply].
> Le 22/08/2024 à 03:08, Mark Volkmann via Cuis-dev a écrit :
>
> I defined the class TextEntry2Morph which is a subclass of TextEntryMorph
> because I wanted to register a block to be evaluated every time it has
> focus and the user presses the escape key. It only adds the instance
> variable escapeAction and these instance methods:
>
> --
> GNU Dr. Geohttp://gnu.org/s/dr-geo/http://gnu-drgeo.blogspot.com/
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>


-- 
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240822/27355f01/attachment.htm>


More information about the Cuis-dev mailing list