Announcement

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

    SelectItem/PickList height and width problem

    Hi

    I have some problems with SelectItem. I need to display image and text beside that image inside the pick list of the SelectItem. I have included an example that reproduce the problem I have in my application.

    Here are the problems (all relating to the code posted below):

    1) Why is cbx1 pick list height and width not correct the first time the pick list is shown but on the second time it is shown, height and width has been adapted correctly ?

    2) How can I make cbx2 not display scroll bar horizontally ?

    I have tested on Chrome and Firefox and both browser give same results.

    In my application, my SelectItem are in a List Grid and the content of my SelectItem are provided with a RestDataSource, so the width will vary from one SelectItem to another one.

    Here is my version of SmartClient

    SmartClient Version: SNAPSHOT_v9.1d_2013-11-07/LGPL Deployment (built 2013-11-07)

    Here is my example

    isc.DynamicForm.create({
    width: 500,
    numCols: 4,
    fields : [{
    ID: "cbx1",
    name: "bugStatus", title: "Bug Status",
    editorType: "comboBox",
    valueMap : {
    "new" : "New",
    "active" : "Active",
    "revisit" : "Revisit",
    "fixed" : "Fixed",
    "delivered" : "Delivered and a very long text that is wider than the control itself",
    "resolved" : "Resolved",
    "reopened" : "Reopened"
    },
    editorProperties : {
    autoFitData: true,

    pickListProperties: {
    formatCellValue : function (value, record, rowNum, colNum) {
    var desc = value;
    desc = "<table><tr><td><img src='http://www.smartclient.com/v/9.0/isomorphic/system/reference/exampleImages/flags/16/US.png'></td><td>" + value + "</td></tr></table>";
    return desc;
    }
    }
    }
    },
    {
    ID: "cbx2",
    name: "bugStatus", title: "Bug Status",
    editorType: "comboBox",
    valueMap : {
    "new" : "New",
    "active" : "Active",
    "revisit" : "Revisit",
    "fixed" : "Fixed",
    "delivered" : "Delivered and a very long text that is wider than the control itself and some text to make it even longer",
    "resolved" : "Resolved",
    "reopened" : "Reopened"
    },
    editorProperties : {
    autoFitData: true,

    pickListProperties: {
    formatCellValue : function (value, record, rowNum, colNum) {
    var desc = value;
    desc = "<table><tr><td><img src='http://i.cdn.turner.com/cnn/.e/img/3.0/global/header/hdr-main.png'></td><td>" + value + "</td></tr></table>";
    return desc;
    }
    }
    }
    }
    ]
    });

    #2
    Anybody has a guess ?

    Comment

    Working...
    X