[Cuis-dev] Morph to just represents paragraphs of text

Juan Vuletich juan at jvuletich.org
Sun Oct 31 15:44:16 PDT 2021

Hi Hilaire,

On 10/31/2021 8:44 AM, Hilaire Fernandes via Cuis-dev wrote:
> Hi,
> I need a morph to display paragraphs of text, may be with some 
> emphasis, but without any editing capabilities.
> LabelMorph only prints string in one line, ignoring LF, etc.
> TextModelMorph is overkill and it still displays the insertion 
> character when in read only mode, the surrounding frame, etc.
> Am I missing anything?
> Thanks
> -- 
> GNU Dr. Geo
> http://drgeo.eu
> http://blog.drgeo.eu

I just fixed the insertion mark when in #disableEditing. I also did a 
few tweaks, to allow using an InnerTextMorph without a TextModelMorph. 
But it still needs a TextModel, that is not really needed for a 
non-editable text.

So, I also added a new class: ReadOnlyTextMorph. It can be used by 
itself or in a ScrollPane. #contents: is simply a Text. No editing 
possible at all, but you can select and copy text from it. It is 
essentially a trimmed copy of InnerTextMorph, but with a Text instead of 
a TextModel. Added a couple of examples of use in the class comment.


Juan Vuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20211031/4a4cd5f8/attachment.htm>

More information about the Cuis-dev mailing list