Hi Walter,
Please find the code
this.$(go.Node, "Auto",
{
name: "metadataTable",
selectionObjectName: "metadataTable",
resizable: true,
resizeObjectName: "SCROLLER",
portSpreading: go.Node.SpreadingNone,
},
new go.Binding("location", "location").makeTwoWay(),
new go.Binding("name", "key").makeTwoWay(),
new go.Binding("opacity", "opacity").makeTwoWay(),
new go.Binding("visible", "visible").makeTwoWay(),
this.$(go.Shape, new go.Binding("stroke", "isHighlighted", function(h) {
return h ? "black" : "#E4E4E4";
})
.ofObject(), {
//figure: "RoundedRectangle",
fill: Colours.TABLE_BACKGROUD,
stroke: Colours.TABLE_BACKGROUD
}),
this.$(go.Panel, "Vertical", {
stretch: go.GraphObject.Horizontal,
alignment: go.Spot.TopLeft,
name: "mainPanel",
maxSize : new go.Size(200, NaN),
},
this.$(go.Panel, "Table", {
stretch: go.GraphObject.Horizontal,
name: "headin",
background: Colours.MAIN_HEADER_PANEL_BACKGROUND_ITEMS_BACKGROUND,
},
this.$(go.TextBlock, {
name:'headerTextBlock',
row: 0,
column: 0,
alignment: go.Spot.Left,
margin: 3,
stroke: Colours.MAIN_HEADER_PANEL_TEXT_COLOUR_ONE,
font: Colours.TABLE_HEADER_TEXT_BLOCK_STYLE_ONE,
wrap: go.TextBlock.None,
overflow: go.TextBlock.OverflowEllipsis,
fromLinkableDuplicates: false, toLinkableDuplicates: false,
// click:(e, o)=> {
// e.handled = true;
// this.changeCategory(e, o.part);
//
// }
},
new go.Binding("text", "headerText1"),
new go.Binding("maxSize", "textBoxSize")
),
this.$(go.TextBlock, {
row: 0,
column: 1,
alignment: go.Spot.Left,
stroke: Colours.MAIN_HEADER_PANEL_TEXT_COLOUR_TWO,
font: Colours.TABLE_HEADER_TEXT_BLOCK_STYLE_ONE,
stretch: go.GraphObject.Horizontal,
wrap: go.TextBlock.None,
overflow: go.TextBlock.OverflowEllipsis,
fromLinkableDuplicates: false, toLinkableDuplicates: false,
},
new go.Binding("text", "headerText2"))),
this.$(go.Panel, "Table", {
stretch: go.GraphObject.Horizontal,
name: "headin",
},new go.Binding("background","background"),
this.$(go.Picture, {
column: 0,
alignment: go.Spot.Left,
//source: "images/table.png",
width: 16,
height: 16,
margin: 2
}, new go.Binding("source", "tabSrc")),
this.$(go.TextBlock, {
column: 1,
alignment: go.Spot.Left,
margin: 3,
stroke: Colours.TABLE_HEADER_FONT_COLOUR,
font: Colours.TABLE_HEADER_TEXT_BLOCK_STYLE_TWO,
stretch: go.GraphObject.Horizontal,
wrap: go.TextBlock.None,
overflow: go.TextBlock.OverflowEllipsis,
fromLinkableDuplicates: false, toLinkableDuplicates: false,
// click:(e, o)=> {
// e.handled = true;
// this.changeCategory(e, o.part);
//
// }
},
new go.Binding("text", "headerText3")),
this.$("PanelExpanderButton", "SCROLLER", {
column: 3,
visible: false,
alignment: go.Spot.Right
})),
this.$("ScrollingTable", {
name: "SCROLLER",
// stretch: go.GraphObject.Fill,
stretch: go.GraphObject.Horizontal,
visible:false
// defaultColumnSeparatorStroke: "gray",
//defaultColumnSeparatorStrokeWidth: 0.5,
},
new go.Binding("TABLE.itemArray", "items"),
new go.Binding("TABLE.column", "left", (left) => {
return left ? 0 : 2;
}),
//new go.Binding("desiredSize", "size", go.Size.parse).makeTwoWay(go.Size.stringify),
new go.Binding("desiredSize", "size").makeTwoWay(), {
"TABLE.itemTemplate": this.$(go.Panel, "TableRow", {
defaultStretch: go.GraphObject.Horizontal,
// fromSpot: go.Spot.RightSide,
//toSpot: go.Spot.LeftSide,
fromSpot: go.Spot.Right, // links only go from the right side to the left side
toSpot: go.Spot.Left,
fromEndSegmentLength: 25,
}, new go.Binding("background", "row",
function(i) { return i % 2 === 0 ? "#f2f2f2" : "transparent" })
.ofObject(),
new go.Binding("portId", "key"),
new go.Binding("portTechProps","techProperties"),
this.$(go.Picture, {
column: 0,
width: 10,
}, new go.Binding("source", "colSrc")),
this.$(go.TextBlock, {
column: 1,
stretch: go.GraphObject.Horizontal,
wrap: go.TextBlock.None,
font: Colours.TABLE_ITEMS_TEXT_BLOCK_STYLE,
overflow: go.TextBlock.OverflowEllipsis,
}, new go.Binding("text", "name"))
),
"TABLE.defaultColumnSeparatorStroke": "gray",
"TABLE.defaultColumnSeparatorStrokeWidth": 0.5,
"TABLE.defaultRowSeparatorStroke": "white",
"TABLE.defaultRowSeparatorStrokeWidth": 0.5,
"TABLE.defaultSeparatorPadding": new go.Margin(1, 3, 0, 3),
"TABLE.background": Colours.TABLE_BACKGROUD
}
),
)
);
with these template ellipses work fine and picture is
now i want to add a another image beside the text which, i want to make dynamically visible and invisible so now i changed my template to
this.$(go.Node, "Auto",
{
name: "metadataTable",
selectionObjectName: "metadataTable",
resizable: true,
resizeObjectName: "SCROLLER",
portSpreading: go.Node.SpreadingNone,
},
new go.Binding("location", "location").makeTwoWay(),
new go.Binding("name", "key").makeTwoWay(),
new go.Binding("opacity", "opacity").makeTwoWay(),
new go.Binding("visible", "visible").makeTwoWay(),
this.$(go.Shape, new go.Binding("stroke", "isHighlighted", function(h) {
return h ? "black" : "#E4E4E4";
})
.ofObject(), {
//figure: "RoundedRectangle",
fill: Colours.TABLE_BACKGROUD,
stroke: Colours.TABLE_BACKGROUD
}),
this.$(go.Panel, "Vertical", {
stretch: go.GraphObject.Horizontal,
alignment: go.Spot.TopLeft,
name: "mainPanel",
maxSize : new go.Size(200, NaN),
},
this.$(go.Panel, "Table", {
stretch: go.GraphObject.Horizontal,
name: "headin",
background: Colours.MAIN_HEADER_PANEL_BACKGROUND_ITEMS_BACKGROUND,
},
new go.Binding("visible", "panelheader1Visibility"),
this.$(go.TextBlock, {
name:'headerTextBlock',
row: 0,
column: 0,
alignment: go.Spot.Left,
margin: 3,
stroke: Colours.MAIN_HEADER_PANEL_TEXT_COLOUR_ONE,
font: Colours.TABLE_HEADER_TEXT_BLOCK_STYLE_ONE,
wrap: go.TextBlock.None,
overflow: go.TextBlock.OverflowEllipsis,
fromLinkableDuplicates: false, toLinkableDuplicates: false,
// click:(e, o)=> {
// e.handled = true;
// this.changeCategory(e, o.part);
//
// }
},
new go.Binding("text", "headerText1"),
new go.Binding("maxSize", "textBoxSize")
),
this.$(go.TextBlock, {
row: 0,
column: 1,
alignment: go.Spot.Left,
stroke: Colours.MAIN_HEADER_PANEL_TEXT_COLOUR_TWO,
font: Colours.TABLE_HEADER_TEXT_BLOCK_STYLE_ONE,
stretch: go.GraphObject.Horizontal,
wrap: go.TextBlock.None,
overflow: go.TextBlock.OverflowEllipsis,
fromLinkableDuplicates: false, toLinkableDuplicates: false,
},
new go.Binding("text", "headerText2"))),
this.$(go.Panel, "Table", {
stretch: go.GraphObject.Horizontal,
name: "headin",
},new go.Binding("background","background"),
this.$(go.Picture, {
column: 0,
alignment: go.Spot.Left,
//source: "images/table.png",
width: 16,
height: 16,
margin: 2
}, new go.Binding("source", "tabSrc")),
this.$(go.TextBlock, {
column: 1,
alignment: go.Spot.Left,
margin: 3,
stroke: Colours.TABLE_HEADER_FONT_COLOUR,
font: Colours.TABLE_HEADER_TEXT_BLOCK_STYLE_TWO,
stretch: go.GraphObject.Horizontal,
wrap: go.TextBlock.None,
overflow: go.TextBlock.OverflowEllipsis,
fromLinkableDuplicates: false, toLinkableDuplicates: false,
},
new go.Binding("text", "headerText3")),
this.$("PanelExpanderButton", "SCROLLER", {
column: 3,
visible: false,
alignment: go.Spot.Right
})),
this.$("ScrollingTable", {
name: "SCROLLER",
// stretch: go.GraphObject.Fill,
stretch: go.GraphObject.Horizontal,
visible:false
// defaultColumnSeparatorStroke: "gray",
//defaultColumnSeparatorStrokeWidth: 0.5,
},
new go.Binding("TABLE.itemArray", "items"),
new go.Binding("TABLE.column", "left", (left) => {
return left ? 0 : 2;
}),
//new go.Binding("desiredSize", "size", go.Size.parse).makeTwoWay(go.Size.stringify),
new go.Binding("desiredSize", "size").makeTwoWay(), {
"TABLE.itemTemplate": this.$(go.Panel, "TableRow", {
defaultStretch: go.GraphObject.Horizontal,
// fromSpot: go.Spot.RightSide,
//toSpot: go.Spot.LeftSide,
fromSpot: go.Spot.Right, // links only go from the right side to the left side
toSpot: go.Spot.Left,
fromEndSegmentLength: 25,
}, new go.Binding("background", "row",
function(i) { return i % 2 === 0 ? "#f2f2f2" : "transparent" })
.ofObject(),
new go.Binding("portId", "key"),
new go.Binding("portTechProps","techProperties"),
this.$(go.Picture, {
column: 0,
width: 10,
}, new go.Binding("source", "colSrc")),
this.$(go.Panel, "Horizontal",
{ column: 1,},
this.$(go.Picture, {
width: 15,
height:12,
visible:true,
source:"./images/unlock.png"
}),
this.$(go.TextBlock, {
//column: 1,
// stretch: go.GraphObject.Horizontal,
wrap: go.TextBlock.None,
font: Colours.TABLE_ITEMS_TEXT_BLOCK_STYLE,
overflow: go.TextBlock.OverflowEllipsis,
// isPanelMain:true
// maxSize: new go.Size(2, NaN),
}, new go.Binding("text", "name"))
)),
"TABLE.defaultColumnSeparatorStroke": "gray",
"TABLE.defaultColumnSeparatorStrokeWidth": 0.5,
"TABLE.defaultRowSeparatorStroke": "white",
"TABLE.defaultRowSeparatorStrokeWidth": 0.5,
"TABLE.defaultSeparatorPadding": new go.Margin(1, 3, 0, 3),
"TABLE.background": Colours.TABLE_BACKGROUD
}
),
)
);
after the change i am unable to see any elipses.
help me with this.