The Panels Component
November 14, 2025
The Abacus Panels component provides a way to layout content. We have two main goals for this component. First, we want to easily layout multiple components or elements with a minimum of fuss. For example, we may want to neatly place 3 components, one on the top and two below. Second, we may want to have a primary component (or two) that is always visible and then a side panel (or two, or three) that can be visible or invisble. Most UI frameworks that have a panels component allow only two panels, but each panel can of course be divided again into two panels. This is sort of the way splitters work in ⎕WC. We have taken a different approach.
We use CSS grid and one look at the grid-template-areas property should tell you how nice a fit it is for the new array notation in Dyalog v20.
For example:
...
l←[
0 0
1 2
3 3
]
p←A.Panels.New ('Content' c) ('GridTemplateRows' l)
There are four components or elements in the content c. This instructs Abacus to layout the first element across the entire parent component, the place the next two elements below that, in equal proportion, and finally the last component all the way across the bottom.
The values in l are simply indices into c, but we could use HTML ids as well. We can change the proportions of the components by changing l:
l←[
0 0 0 0
1 1 1 2
3 3 3 3
]
Consider a case of two components, a main component and a right-hand sidebar that should only be visible on demand. On startup the GridTemplateAreas is:
[
0
]
(or simply ⍪0) a 1 by 1 matrix. This indicates that the main component should take up all of the space. When the side bar is reqested we reset it to:
[
0 0 0 1
]
This makes the sidebar visible, and gives it 25% of the available space, shrinking the main component to 75% of the available space.
Panels can be resized, if desired and applicable, using keyboard shortcuts for now. At some point we will allow resizing via the mouse.