Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to add a DrawPane with DrawLables to a Layout?

    Hi,

    executing the following code leads to the Error “TypeError: _4 is null”

    Code:
     
    isc.VLayout.create({
    	id: "drawPaneLayout",
    	showEdges: true,
    	height: 400,
    	width: 400,
    	members: [
    		isc.DrawPane.create({
    			ID: "eventDrawPane",
    			autoDraw: true,
    			showEdges: true,
    			cursor: "default",
    			height: "100%",
    	}),
    	isc.DrawLabel.create({
    		drawPane: eventDrawPane,
    			id: "rect",
    			click: function() {isc.say("rect click"); return true},
    			widht: 100,	
    			height: 100,
    			autoDraw: true,
    			left: 50,
    			top: 50
    		})
    	]
    });
    How to add a DrawPane with DrawLables to a Layout?

    Greetings Thomas

    #2
    DrawLabel is not a Canvas so doesn't belong in layout.members. Just remove it from the members array and it will show up in the DrawPane because of your drawPane: eventDrawPane declaration.

    Comment

    Working...
    X