[Cuis-dev] LabelMorph text alignment

Alexandre Rousseau yalexr at gmail.com
Tue Mar 14 06:06:36 PDT 2023


Hi all.

Given this code ...

"self is a LayoutMorph newColumn instance"

m := LabelMorph new :: contents: '0.0'.
>
m borderWidth: 3; borderColor: Color black.
> m layoutSpec :: proportionalWidth: 1.0.
> self addMorph: m.


I would like the text inside m to be right-aligned.

[image: Screenshot 2023-03-14 at 8.57.46 AM.png]

Am I correct in assuming that there is no other way to achieve this
(text-alignment right) than to embed another LayoutMorph newRow instance
inside of self, and then embed m (the LabelMorph instance) inside of that?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230314/18453062/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2023-03-14 at 8.57.46 AM.png
Type: image/png
Size: 11936 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230314/18453062/attachment.png>


More information about the Cuis-dev mailing list