I’m trying to stretch a textblock to fit a horizontal already stretched panel. It looks like this now.
I’ve tried to put it in a vertical panel, but still nothing.
Here is my code:
$(go.Panel, 'Horizontal',
{
stretch: go.GraphObject.Horizontal,
defaultStretch: go.GraphObject.Horizontal,
background: 'red',
},
$(go.Panel, 'Vertical',
{
defaultAlignment: go.Spot.Left,
stretch: go.GraphObject.Horizontal,
defaultStretch: go.GraphObject.Horizontal,
background: 'blue',
},
$(go.TextBlock,
{
name: 'GroupName',
font: colors.groupNameFont,
margin: colors.groupNamePadding,
stretch: go.GraphObject.Horizontal,
verticalAlignment: go.Spot.Center,
textAlign: options.dir === 'rtl' ? 'right' : 'left',
background: 'green',
},
new go.Binding('text', 'label')
),
),
$('GroupExpanderButton')
)