[Cuis-dev] TextEntryMorph vertical alignment

Mark Volkmann r.mark.volkmann at gmail.com
Sun Aug 4 18:38:20 PDT 2024


If I create a TextEntryMorph like this:

todoEntry := TextEntryMorph contents: ''.

and don't send any other messages to it, it renders like the attached
screenshot.
Note how the text I enter is pushed up to the top rather than being
centered vertically inside the border. It seems like it should be centered
vertically by default.

I can get it to be centered with this:

myTextEntryMorph morphExtent: 200 @ 0

The zero for the y causes it to compute the height.
But then there is no "padding" above or below the entered text.
Is there an easy way to keep the default height, but get it to center
vertically?

-- 
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240804/c556ec1d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2024-08-04 at 8.28.36?PM.png
Type: image/png
Size: 1589 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240804/c556ec1d/attachment.png>


More information about the Cuis-dev mailing list