Listbox Horizontal Scroll

3 posts, 0 answers
  1. Chris Castle
    Chris Castle avatar
    33 posts
    Member since:
    Mar 2006

    Posted 04 Dec 2007 Link to this post

    I have a list box that I do not want the horizontal scroll to ever show.  I want the vertical if it is needed though.  How can I force the horizontal to never show?  I tried setting Visibility to hidden, but it still shows.

    Thanks,
    C
  2. Nikolay
    Admin
    Nikolay avatar
    1804 posts

    Posted 05 Dec 2007 Link to this post

    Hi Chris,

    The proper way to hide the horizontal scroll is the following:
     
    RadListBoxElement elem = (RadListBoxElement)radListBox1.RootElement.Children[0];  
    elem.HorizontalScrollState = ScrollState.AlwaysHide; 

    If you have additional questions, do not hesitate to contact us.
     

    Best wishes,
    Nikolay
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Angel
    Admin
    Angel avatar
    121 posts

    Posted 12 Dec 2007 Link to this post

    A quick update, Chris. There will be an easier way to access the listbox element in the upcoming version of RadControls. The code from the previous post will be like this:

    this.radListBox1.ListBoxElement.HorizontalScrollState = ScrollState.AlwaysHide;


    Greetings,
    Angel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top