SIL.FieldWorks.Common.Controls.SimpleExplorerBar.ManageVScrollBar C# (CSharp) Method

ManageVScrollBar() private method

Manages the visibility and enabled state of the vertical scroll bar.
private ManageVScrollBar ( ) : void
return void
		private void ManageVScrollBar()
		{
			if (!m_alwaysShowVScroll)
				return;

			int totalItemHeights = 0;
			foreach (ExplorerBarItem item in m_items)
				totalItemHeights += item.Height;

			if (totalItemHeights > ClientSize.Height)
			{
				VerticalScroll.Enabled = true;
				AutoScroll = true;
			}
			else
			{
				AutoScroll = false;
				VerticalScroll.Visible = true;
				VerticalScroll.Enabled = false;
			}
		}