How do I get a TextBlock background to span the entire panel it is in (Note: I am not referring to the textbox that appears on double-click)? Take for example the image below:
For the INTEGER highlighted in green, I want the top, bottom, left, and right to be filled with green. So somewhere between DATE and INTEGER on the top and INTEGER and INTEGER on the bottom. Then touching the border on the left and right. Here is the code I have with all the extra removed:
var itemTemplate =
$(go.Panel, 'TableRow',
{
...
},
$(go.TextBlock,
{
name: 'FIELD',
column: 0,
margin: new go.Margin(6, 5, 3, 5),
stretch: go.GraphObject.Horizontal,
...
},
),
$(go.TextBlock,
{
name: 'DATATYPE',
column: 1,
margin: new go.Margin(5, 5, 4, 5),
stretch: go.GraphObject.Horizontal,
...
}
)
);
Note that I programmatically change the TextBlock background using the following:
field.findObject('DATATYPE').background = color;