Announcement

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

    the width of PickList should autofit so that it does not truncate contents.

    Hi Isomorphic,

    I am using 12.1-p20210219 smartGWT version.
    My requirement is that picklist should take width according to its content. The width of picklist should adjust according to its content without having the horizontal scrollbar.

    I have used the following properties:
    final ListGrid pickListProps = new ListGrid();
    pickListProps.setAlternateRecordStyles(true);
    pickListProps.setAutoFitFieldWidths(true);
    pickListProps.setAutoFitWidthApproach(AutoFitWidthApproach.BOTH);
    setPickListProperties(pickListProps);

    Its works perfect for small content , but when data is too large , the picklist does not exceeds its width beyond 400px.(I don’t want to hard code the picklist width)
    My requirement is the width should autofit so that it does not truncate contents.

    Attaching required screenshot as actual.png and desired.png
    Attached Files

    #2
    Hi Preeti
    Thanks for the clear description and screenshots.
    What's happening is that the grid is hitting the autoFitMaxWith at which point it shows a h-scrollbar rather than expanding further.

    This is a property that's being set explicitly by the SelectItem and is not currently configurable but should be.
    We're considering this a bug and will be adding the ability to configure the max width via a property soon. Well follow up here when this is resolved

    Regards
    Isomorphic Software

    Comment

    Working...
    X