Dear Friends,
Greetings! I want to create a table below a rectangle. Table should not visible initially, only rectangle can show initially with a name. When I click on the rectangle it should open a popup link, there user has to enter details, based on the details in that popup (when they save or close the popup ) table filled with text and table has to visible below the rectangle.
I have created rectangle with text using below code:
diagram.nodeTemplateMap.add("RightRectangle",
$$(go.Node, "Spot", nodeStyle(),
{
selectionAdornmentTemplate: // adornment when a group is selected
$$(go.Adornment, "Auto",
$$(go.Placeholder),
$$("Button",
{
alignment: go.Spot.LeftCenter,
click: addRightSubNodeAndLink // this function is defined below
},
$$(go.Shape, "PlusLine", {name:"left", width: 6, height: 6 })
)
)
},
new go.Binding("movable","movable"),
new go.Binding("location","loc", go.Point.parse).makeTwoWay(go.Point.stringify),
$$(go.Panel, "Auto",
$$(go.Shape, "Rectangle",
{ minSize: new go.Size(200, 90),
fill:new $$(go.Brush, "Linear", { 0.0: "White", 1.0: "red" }),
stroke: null
},
new go.Binding("fill")),
$$(go.TextBlock, "Rectangle",
{ font: "bold 11pt Helvetica, Arial, sans-serif", stroke: "#000000", editable: false, width:150,height:60, background:"white", textAlign:"center", verticalAlignment: go.Spot.Center},
new go.Binding("text"))
),
// three named ports, one on each side except the top, all output only:
makePort("L", go.Spot.Left, false, false),
{
click: function (e, obj) {
selectedNode(e, obj)
}
},
{ doubleClick: function (e, obj) { showMessage("Clicked on " + obj.resizable); obj.resizable = false; } }
));
//----------------
diagram.model.addNodeData({key:"L_"+leftMainNodeInc,category: "LeftRectangle", text: "Cause"+leftMainNodeInc,loc:go.Point.stringify(p),movable:false,subObj:0})
//--------------------------
Please help me to draw table under this and open a popup window to pass message and get message from there and fill&show the table.
iam new to this. Pls help me to get this.
Thanks in advance,
Syed Abdul Rahim