Announcement

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

    Adding image in dynamicForm

    Hi,

    As it took me a little while to find out how to insert a clickable image in a dynamicForm, I post the solution here.

    As 'ImageItem' does not exist, I use 'CanvasItem' and then set the img with the canvas property.


    Code:
    function t() {
        alert('foobar');
    }
    
    isc.Img.create({
        autoDraw: false,
        ID:"myImage",
        width:16, height:16,
        imageType: "normal",
        src: "find.gif",
        click:t
    });
    
    isc.DynamicForm.create({
        autoDraw: true,
        ID:"dynaForm",
        cellPadding:4,
        numCols:1,
        fields:[
            {name:"image",type:"canvas",canvas:myImage,showTitle:false},
        ],
    });
    Last edited by jerome915; 1 May 2012, 10:08.
Working...
X