Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 6977

Find Parent node in treeview

$
0
0

@gunnu wrote:

i want to hide line marked as red if the node was parent node. and align correctly this is custom treelayout . can you help

$(go.Panel, "Horizontal",
                {
                    name: "indentPanel",
                    alignment: go.Spot.Left, // This spot gets modified by the layout to be more indented
                    alignmentFocus: go.Spot.Left

                },


                $("TreeExpanderButton", // support expanding/collapsing subtrees
                    {
                        width: 14,
                        height: 14,
                        "ButtonIcon.stroke": "lightgray",
                        "ButtonIcon.strokeWidth": 1,
                        "ButtonBorder.fill": "white",
                        "ButtonBorder.figure": "Rectangle",
                        margin:6

                    }
                ),

                $(go.Panel, "Horizontal", {
                        position: new go.Point(18, 0)

                    },
                $(go.Shape, "LineV",
                    new go.Binding("visible", "toNode", function (n) {
                        if (n.data.brush) return n.data.brush;
                        return "lightgray";
                    }).ofObject(),
                    {  stroke: "lightgray", width: 1,
                        height: 25

                    }
                ),

                $(go.Shape, "LineH", {
                    width: 13,
                    height: 22,
                    stroke: "lightgray"


                }

                ),

                    $(go.TextBlock,
                        {margin: 2, name: "MAINTXT" },
                        new go.Binding("isUnderline", "underline"),
                        //new go.Binding("font", "bold"),



                        {font: '8pt Verdana, sans-serif', margin: 8},
                        new go.Binding('margin', 'isTreeLeaf', function (leaf) {
                            return leaf ? leafMargin : 5;
                        }).ofObject(),
                        new go.Binding("text"))



                ),

Posts: 4

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 6977

Latest Images

Trending Articles



Latest Images