Make TextBlock width dynamic with the width of panel

In my case the width of the Group Panel is dynamic. There is a text block inside it and it. When I am trying to put log text inside it, it doesn’t wrap it the text is more than the width of Panel

Please help in adding the proper property. I have tried a few combinations using, size, minSize, wrap, etc but it didn’t work.

Screenshot from 2023-12-27 14-59-48

The name of the group goes beyond the group.
$(go.Panel, “Table”, // button next to TextBlock
{
stretch: go.GraphObject.Horizontal,
background: ‘red’,
minSize: new go.Size(200, 0)
},
new go.Binding(“background”, “fill”),
// new go.Binding(“background”, “horiz”, defaultColor),
// new go.Binding(“background”, “color”),
$(“SubGraphExpanderButton”, { alignment: go.Spot.Right, margin: 5 },),
$(go.TextBlock,
{
alignment: go.Spot.Left,
editable: true,
margin: 5,
font: defaultFont(false),
opacity: 0.75, // allow some color to show through
stroke: isDark ? “white” : “#404040”,
overflow: go.TextBlock.OverflowClip,
minSize: new go.Size(140, NaN),
wrap: go.TextBlock.WrapFit
},
new go.Binding(“text”, “viewName”).makeTwoWay()),

Whatever contains your header controls its size, in conjunction with properties on the header itself. Normally that should be a “Table” Panel. What is it?

Try setting stretch on the TextBlock so it stretches horizontally.

[quote=“walter, post:2, topic:16615”]
stretch
[/quote]Yes its a table.

Thnak’s it worked