Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
800
Way to detect if vertical scroll bar is displayed.
posted

I'd like to know if there is a way to know if vertical scroll bar is displayed. I need to adjust column size based on if vertical scroll bar is shown or not. I don't want to use AutoFitStyle.ResizeAllColumns, due to some design resons. I also like to know how to get the width of vertical scroll bar. Thanks.

 

 

Parents
  • 37774
    posted

    I'm not sure if there's a better way to do it, but one approach might be to check:

    this.ultraGrid1.ActiveRowScrollRegion.VisibleRows.Count == this.ultraGrid1.Rows.Count

    As for the scrollbar width, this might be determined by the system settings (though I'm not certain of this), so you could try looking at "SystemInformation.VerticalScrollBarWidth".

    -Matt

Reply Children