jQuery UI Widgets Forums Lists ListBox ListBox Scrollbars

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • ListBox Scrollbars #6805

    scgrant327
    Member

    I am including jqx-all.js and instancing a ListBox:


    $("#courseMarks").jqxListBox({
    allowDrop: true,
    allowDrag: true,
    checkboxes: true,
    theme: theme,
    width: 200,
    height: 290
    });

    The listbox starts without any items. I dynamically add items chosen by the user:

    $("#courseMarks").jqxListBox("addItem","test");

    I would expect the scrollbars to automagically appear once the list fills up, but they do not. Why?

    –Sam

    ListBox Scrollbars #6807

    Peter Stoev
    Keymaster

    Hi Sam,

    I have tested the reported behavior. It works on my side with the latest version of jQWidgets. ScrollBars appear as expected when there are multiple items in the ListBox(at least 13 in this sample). You can add items by clicking the button.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqx-all.js"></script>
    </head>
    <body>
    <div id='content'>
    <script type="text/javascript">
    $(document).ready(function () {
    var theme = '';
    // Create a jqxListBox
    $("#jqxWidget").jqxListBox({ checkboxes: true, width: 200, height: 290 });
    $("#Button").bind('click', function () {
    $("#jqxWidget").jqxListBox('addItem', 'Test');
    });
    });
    </script>
    <div id='jqxWidget'>
    </div>
    <input type="button" id="Button" value="Button" />
    </div>
    </body>
    </html>

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.