datagridviewalignmentcellapldyalog

Setting the vertical alignment of grid cells


Is there a way to align the top of the cell entries in a grid row when the cells contain text that spans more than one line?

Example:

Test
'F'⎕WC'Form'
'F.G'⎕WC'Grid'('Values'(1 2⍴('foo',[0.5]'bar')'baz'))('CellHeights' 10)('RowTitleAlign' 'TopLeft')

Here I would like "baz" to be vertically aligned with "foo".

I use Dyalog APL 16.0 Classic.

enter image description here


Solution

  • There's no native to do it, but you can add an empty row below baz to force the alignment:

    F.G.Values[1;]←⊂[2 3]↑F.G.Values[1;]
    

    screenshot of result