Field Width on Icon Click

I have an icon which on click will show a picker dialog.
On selecting from the picker dialog the values will be displayed in the corresponding
field.
My issue if the value is too long the field width increases.This is in the case of the form.
In the case of ListGrid if the value is too long there is no visibility of icon itself.
How can the field width be handled in such case?

I worked with the following example:

<!-- **************************************************************************** -->
<!-- FILE: /examples/custom_components/CustomPicker/YesNoMaybeItem.js -->
<!-- **************************************************************************** -->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
/*---------->    YesNoMaybeItem.js    <----------*/


// subclass either TextItem or StaticTextItem, depending on whether we
// provide a free-form edit field as well as the value picker
ClassFactory.defineClass("YesNoMaybeItem", StaticTextItem);

// class (static) properties and methods
YesNoMaybeItem.addClassProperties({
    // (just placeholders for now - these are set dynamically)
    dialog:null,
    currentEditor:null,
    
    // create the picker dialog
    makeDialog : function () {
        YesNoMaybeItem.dialog = Dialog.create({
            autoDraw:false,
            autoCenter:false,
            isModal:true,
            showHeader:false,
            showToolbar:false,
            width:130,
            height:110,
            bodyDefaults:{layoutMargin:10, membersMargin:10},
            items:[
                Button.create({title:"YES", click:"YesNoMaybeItem.setValue('The selected option here is YES YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS')"}),
                Button.create({title:"NO", click:"YesNoMaybeItem.setValue('The selected option here is NO NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO')"}),
                Button.create({title:"MAYBE", click:"YesNoMaybeItem.setValue('The selected option here is MAY BE')"})
            ]
        });
    },
    // show the picker dialog at the specified position (could be smarter about this)
    showDialog : function (left, top) {
        this.dialog.moveTo(left, top);
        this.dialog.show();
    },
    // set the specified value and dismiss the picker dialog
    setValue : function (value) {
        this.currentEditor.setValue(value);
        this.dialog.hide();
    }    
});

// instance properties and methods
YesNoMaybeItem.addProperties({
    icons:[{}], // could specify a different image here

    // (this logic could alternatively go on the 'click' handler of the icon object)
    iconClick : function (form, item, icon) {
        // get global coordinates of the clicked picker icon
        var iconRect = this.getIconPageRect(icon);

        // lazily create the YesNoMaybe picker dialog the first time a yesNoMaybe editor is clicked
        if (!YesNoMaybeItem.dialog) YesNoMaybeItem.makeDialog();

        // remember what editor is active, so we can set its value from the picker dialog
        YesNoMaybeItem.currentEditor = this;

        // show the picker dialog
        YesNoMaybeItem.showDialog(iconRect[0],iconRect[1]);
    }
});

isc.DynamicForm.create({
    ID:"animalForm",
    left:50, top:50,
    fields:[
        {name:"decision", Title:"Decision", editorType:"yesNoMaybe"}
    ]
});

How can this issue be solved in the case of form and listgrid?

Hi Shanthi,
StaticTextItems support an undocumented property “clipValue” (default false)
If set to true and the form item has a specified width, the value will be clipped at the appropriate width.

We’ll be exposing this property in our upcoming 6.1 release - let us know if you encounter any problems using it

Thanks

Isomorphic Software

Hi Shanthi,
We just wanted to update this ticket to let you know that SmartClient version 6.5 is now available for download, and includes this documentation
Regards

Isomorphic Software

Field width on Icon click

Thanks the property “clip value” works fine.