[Cuis-dev] LayoutMorph subclass instance #beColumn has not effect

Hilaire Fernandes hfern at free.fr
Mon Mar 13 15:48:11 PDT 2023


Hi Alexandre,

Most of the time, you don't need to subclass LayoutMorph, unless you 
want to define new sort of complex widget.

You will create a LayoutMoprh instance you can then add to a panel or a 
window.

Try this:

     LayoutMorph newColumn ::
         addMorph: (BoxedMorph new color: Color red; yourself);
         addMorph: (BoxedMorph new color: Color green; yourself);
         addMorph: (BoxedMorph new color: Color blue; yourself);
         openInWorld

HTH

Hilaire


Le 13/03/2023 à 17:36, Alexandre Rousseau via Cuis-dev a écrit :
> Defining a class as subclass of LayoutMorph and initializing it thus:
>
>     initialize
>       super initialize.
>       self beColumn.
>
>
> morphs added to it still appear next to each other, horizontally, as 
> if #beColumn was ignored.
>
> Is this expected behaviour for a subclass of LayoutMorph?
>
-- 
GNU Dr. Geo
http://drgeo.eu
http://blog.drgeo.eu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230313/f4059362/attachment.htm>


More information about the Cuis-dev mailing list