[Cuis-dev] TAble Layout

H. Hirzel hannes.hirzel at gmail.com
Wed Feb 12 09:59:43 PST 2025


Hello Hilaire

The class TableMorph is in the package 
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-UI/blob/main/lib/UI-Panel.pck.st

With only 10 instance methods it manages to accomplish the layout 
behavior! If the TableMorph is resized the rows are updated accordingly. 
Useful for certain cases.

The example shown with a screen shot in this thread is

TableMorph example1

So it seems to behave like a simplified version of the Squeak TableLayout

https://wiki.squeak.org/squeak/2340

Which behaves more like a CSS Flexbox layout arrangement.

The question is: what are the requirements for the TableMorph?

Should the rows have aligned columns or not?

I guess both use cases have applications.

--Hannes

On 12/02/2025 3:59 pm, H. Hirzel wrote:
>
>
> On 12/02/2025 3:50 pm, H. Hirzel wrote:
>>
>>
>> On 06/02/2025 8:41 pm, Hilaire Fernandes via Cuis-dev wrote:
>>>
>>> I wrote a simple TableMorph to arrange kind of BoxMorph in several 
>>> rows.  In -UI repo.
>>>
>>
>> Do mean this package?
>>
>> https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-UI/blob/main/lib/UI-Table.pck.st
>>
>> or this one?
>>
>> https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-UI/blob/main/lib/UI-Panel.pck.st
>>
>> --Hannes
>>
>>> It does not work for PlacedMorph with unknown extent. ie "TableMorph 
>>> example2" does not work.
>>>
>>> table morph
>
> I have not looked into the code yet, but
>
> I guess there is a need to add 'TableCellMorphs' of a width given as 
> an absolute value in each table row.
>
> The actual content then is probably placed inside centered.
>
> --Hannes
>
>
>>> -- 
>>> http://mamot.fr/@drgeo
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250212/959991d8/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TableMorph.jpeg
Type: image/jpeg
Size: 12163 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250212/959991d8/attachment.jpeg>


More information about the Cuis-dev mailing list