Quantcast
Channel: Northwoods Software - Latest topics
Viewing all articles
Browse latest Browse all 7425

Add text/label inside a shape

$
0
0

@nitin291989 wrote:

How to add a text/label inside a shape?

@walter, I have modified the "myRowHeaders" from the sample : https://gojs.net/temp/timelineInfinite.html to the following:

Now, i wanted to have some texts inside the 2 shapes: "Square" and "Rectangle".

myRowHeaders =
   $(go.Diagram, "myRowHeadersDiv",
      {
		nodeTemplate:
          $(go.Node, "Auto",
        	...
    		$(go.Panel, "Horizontal",
    			{ alignment: go.Spot.Left},
				$(go.Shape, "Square",
					{
						...
						click: function (e, shape) {
							...
						}
					}
				),

				$(go.Panel, "Vertical",
					...
					$(go.TextBlock,
						...
					),
					$(go.Shape, "Rectangle",
						{
							click: function (e, shape) {
								...
							}
						},
					)
				)
    		)
    	)
   });

How this can be achieved?

Thanks.

Posts: 12

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7425

Latest Images

Trending Articles



Latest Images