Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Disable horizontal scrollbar? Disable horizontal scrollbar? #58786

    npayot
    Participant

    Actually the horizontal scrollbar is always present on the DOM. It’s better to check for the visibility and hide it it’s visible:

    var horizontalScrollBarId = '#horizontalScrollBar' + 'listboxId';
    var horizontalScrollBar = $('#listboxId').find(horizontalScrollBarId);
    // Horizontal scrollbar is visible
    if (horizontalScrollBar.css('visibility') === 'visible') {
        horizontalScrollBar.css('visibility', 'hidden');
        $('#listboxId').css('height', $('#listboxId').height() - 20);
    }

    My mistake.

    • This reply was modified 9 years, 9 months ago by  npayot.
    in reply to: Disable horizontal scrollbar? Disable horizontal scrollbar? #58774

    npayot
    Participant

    Hi,

    Topic is a bit old but this issue happened to me so just in case someone’s looking for a solution:
    – Wrap each row into a css class with `{ width: 100px; text-overflow: ellipsis; overflow: hidden; }’
    – Remove the horizontal scrollbar once the source’s loaded and reduce listbox height by 20

    var horizontalScrollBarId = '#horizontalScrollBar + 'listboxId';
    var horizontalScrollBar = $('#listboxId').find(horizontalScrollBarId);
    // Horizontal scrollbar exists
    if (horizontalScrollBar.length > 0) {
        horizontalScrollBar.remove();
        $('#listboxId').css('height', $('#listboxId').height() - 20);
    }

    Regards,

    • This reply was modified 9 years, 9 months ago by  npayot.
Viewing 2 posts - 1 through 2 (of 2 total)