Announcement

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

    Scrollbar within a ListGridField?

    Hello,

    Is it possible to add a horizontal scrollbar within a ListGrid field? For example a field that contains 4000 characters within it is wrapping a lot, using up many vertical lines, but is it feasible to put a scrollbar inside the field so it takes up less space? See screenshot:

    The ListGrid already has a horizontal scrollbar at the bottom, but it is for the entire ListGrid, not an individual field.

    Click image for larger version  Name:	scrollbar question.png Views:	0 Size:	253.6 KB ID:	261902

    #2
    You can do this via showRecordComponents with showRecordComponentsByCell. You would just a Canvas with the field's content.

    You would definitely want to use recordComponentPoolingMode:"recycle" for performance, and use setContents() to update the contents in updateRecordComponent().

    A final refinement would be preserving horizontal scroll positions by added a Scrolled handler and storing the scroll position in the record, so you can restore it in updateRecordComponent().

    However, this is definitely a bit of an unusual interface. You might consider a hover, combined with perhaps clicking to view the content in some way that won't require horizontal scrolling, which is awkward.

    Comment

    Working...
    X