Variable height in a table

I am trying to vary the height of the shape of a row in a table.

(go.Panel, 'Vertical', { row: 2, column: 1, name: 'BODY', stretch: go.GraphObject.Fill, visible: true, margin: new go.Margin(0, 0, 5, 0), }, new go.Binding('visible', 'components[0].properties', function (t) { return !!t; }), (go.Panel, ‘Auto’,
// stretch: go.GraphObject.Fill
width: 180
(go.Shape, 'Rectangle', { stroke: '#D7D7D7', fill: '#FFFFFF', // default color, alignment: go.Spot.Left, }), (go.TextBlock, { margin: 4,
wrap: go.TextBlock.OverflowEllipsis,
textAlign: ‘left’,
alignment: go.Spot.Left,
spacingAbove: 5,
height: 60 },
new go.Binding(‘text’, ‘’, this.propertiesInfo))

this.propertiesInfo returns a string that may vary in size. How can I make the height variable based on the size of the content in the textblock?


components[0].properties is not a valid source property name.

Try this instead:

new go.Binding("visible", "components", function(a) { return !!a[0].properties; })

Regarding your main question, I would remove the “Vertical” Panel – it seems useless to me because it only has one element in it. (It’s hard to tell, since you didn’t format your code using Code Formatting. )