Kannan Thirumal
Senior Member
Offline
I Love Mind Fusion Diagram :-)
Posts: 273
Location: Bangalore, India
Joined: Jan 18 th, 2019
|
Re: How to show scroll bar in container node !
Reply #12 - Aug 8th, 2019 at 7:18am
|
Print Post
|
Hi,
I tried the same but still not shown. Could you please check the below code?
drawTableNode() {
var canvasParent = document.createElement("div"); document.body.appendChild(canvasParent); let canvas = document.createElement("canvas"); canvasParent.appendChild(canvas); this.diagram = Diagram.create(canvas);
this.diagram.setMeasureUnit(GraphicsUnit.Pixel); this.diagram.setAutoScroll(true); this.diagram.setBehavior(MindFusion.Diagramming.Behavior.Modify); this.diagram.setAllowSelfLoops(false);
var table1 = this.diagram.getFactory().createTableNode(400, 100, 150, 250);
table1.redimTable(2, 9); (table1 as any).useScrollBars = true; table1.setScrollable(true); table1.setColumnWidth(0, 130); (MIND as any).ScrollBar.prototype.background = "#e0e9e9"; (MIND as any).ScrollBar.prototype.foreground = "DarkGray"; table1.setBrush("#FFFFFF"); table1.setCaptionBackBrush("#c0c0c0"); table1.setCaptionHeight(0); table1.setLocked(true); table1.setObstacle(true); table1.setAllowIncomingLinks(false); table1.setAllowOutgoingLinks(false); table1.setShadowColor("transparent"); table1.setCellFrameStyle(MIND.CellFrameStyle.None); let nodes: Array<string> = ["Description", "Assay of Testosterone (%LC = 1% w/w)", "Assay of Alcohol (%LC = 67% w/w)", "Assay of Isopropyl myristate (%LC = 0.65% w/w)", "Related substances", "Content uniformity", "pH", "Viscosity", "Minimum fill volume"]; for (let i = 0; i < nodes.length; i++) { let rowHeight = this.getRowHeight(nodes[i]) table1.setRowHeight(i, rowHeight); var cell = table1.getCell(0, i); cell.setText(nodes[i]); cell.setTextColor("#000000"); cell.setBrush("#ffffff"); cell.setFont(new Font("verdana", 13, true)); }
table1.setCurrentScrollRow(0); }
Regards, Kannan
|