Announcement

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

    Address of properties in child objects

    Dear Sirs,
    I have defined a new Class.
    Code:
    isc.defineClass("DragPiece2", "VStack").addProperties({
        width:88, height:88,
        layoutAlign:"center",
        canDragReposition:true,
        canDrop:true,
        dragAppearance:"target",
        showShadow: true,
        shadowSoftness: 10,
        shadowOffset: 5,	
    	members:[
    		isc.Img.create({
    			width:88, height:88, border:"1px solid gray",
    			appImgDir:"Bilder/",
    			src: "Hund2_L1K.jpg"
    		}),
    		isc.Label.create({
    			left:20,
    			top:10,
    			width:88,
    			height: 30,
    			padding: 10,
    			align: "center",
    			valign: "center",
    			wrap: true,
    			border:"1px solid black",
    			backgroundColor:"lightyellow",
    			contents: "Hallo, ich bins"
    		})
    	]
    })
    During creation I want to set a property in a child object (IMG or LABEL) e.g. the src in Img

    Code:
    isc.DragPiece2.create({ID:"h1",width:188})
    This is the property in Object VSTACK.
    Thanks
    Rolf

    #2
    Bad usage: you have only a single Label and Img component, so more than one instance of your class won't work. Subcomponents should be created in initWidget(). See QuickStart Guide Chapter 9 and especially the Component Reuse sample in the Extending folder of the Feature Explorer

    Comment

    Working...
    X