Scrollbar for Listbox in WebForm

  • 14 years ago

    Dear all,

    Can I add scrollbar (horizontal or/and vertical) in WebForm's Listbox ?
    If yes, can you show me the way to make it, please !
    I use VS 2003 Enterprise edition.

    Regards,
    Jkusmanto












  • 14 years ago

    To solve this problem, first add a new Panel Web Control from the toolbox on to your webform. After that place your Listbox into that Panel Control.

    After that add the following object to the style attribute of the Panel control in the HTML view of the webform.

    OVERFLOW: auto;

     

    this will place a vertical or horizontal scrollbar, on your listbox if needed automatically.

    hope solved ur problem.

  • 14 years ago

    Thanks for your reply vampire007,

    Before I post my question/problem, I have doen like what you suggested.
    The problem is : the text that I want to add into the listbox (as an item) is longer than the width of the listbox. So, a part of the text is onreadable (is cut).

    Rgds,
    Jkusmanto











  • 13 years ago

    hi,

    its been a year , after which I am answering ur questionStick out tongue

     

    Well u must have solved this problem, but just to answer here is the solution:

    Make the width of the Panel control to 0 percent.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The question of whether computers can think is just like the question of whether submarines can swim.” - Edsger W. Dijkstra