Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > ToolBar > How to remove vertical scroll bar for RadToolBarSplitButton

Answered How to remove vertical scroll bar for RadToolBarSplitButton

Feed from this thread
  • Posted on Nov 22, 2011 (permalink)

    Hi,
    I have a RadToolBarSplitButton where I set buttons in runtime.
    I calcule the dropdown height from the number of  button.
    
    But everyime the vertical scroll bar are visible.
    
    How do you remove this scroll bar ?
    
    
    int dropDownHeight = (int)(Annees.Buttons.Count * 25);
    if (dropDownHeight > 250)
    {
       dropDownHeight = 250;
       //show vertical scroll bar
    }
    else
    {
      //not show vertical scroll bar
    }
                             
    Annees.DropDownHeight = Unit.Pixel(dropDownHeight);

    Reply

  • Answer Princy MVP avatar

    Posted on Nov 23, 2011 (permalink)

    Hello,

    If you set the DropDownHeight property of RadToolBarSplitButton, then it automatically shows vertical scrollbar. Inorder to remove vertical scrollbar you can try the following CSS.

    CSS:
    <style type="text/css">
    .RadToolBarDropDown_Default
      {
        overflow-y:hidden ! important;
      }
    </style>
     
    Thanks,
    Princy.

    Reply

  • Answer Kevin Master avatar

    Posted on Nov 23, 2011 (permalink)

    Hello Stephane,

    I think the better solution is that you change your code to something like this:

    int dropDownHeight = (int)(Annees.Buttons.Count * 25);
      
    if (dropDownHeight > 250)
    {   
        // set drop-down height, scroll bar is shown
        Annees.DropDownHeight = Unit.Pixel(250);  
    }
    else
    {  
        // don't set drop-down height, no scroll bar will be shown
        Annees.DropDownHeight = Unit.Empty;
    }

    Princy's solution will hide the scrollbar even when you need it to be there.

    I hope that helps.

    Reply

  • Posted on Nov 23, 2011 (permalink)

    Hi all,
    thanks for your help Kevin and Princy.

    It's ok for me.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > ToolBar > How to remove vertical scroll bar for RadToolBarSplitButton
Related resources for "How to remove vertical scroll bar for RadToolBarSplitButton"

[   ASP.NET ToolBar Features  |  Documentation  |  Demos  |  Telerik TV   |   Self-Paced Trainer   |  Step-by-step Tutorial  ]