System.Windows.Forms.TextBox.AutoCompleteListBox.LayoutListBox C# (CSharp) Method

LayoutListBox() private method

private LayoutListBox ( ) : void
return void
			void LayoutListBox ()
			{
				int total_height = owner.auto_complete_matches.Count * item_height;
				page_size = Math.Max (Height / item_height, 1);
				last_item = GetLastVisibleItem ();

				if (Height < total_height) {
					vscroll.Visible = true;
					vscroll.Maximum = owner.auto_complete_matches.Count - 1;
					vscroll.LargeChange = page_size;
					vscroll.Location = new Point (Width - vscroll.Width, 0);
					vscroll.Height = Height - item_height;
				} else
					vscroll.Visible = false;

				resizer_bounds = new Rectangle (Width - item_height, Height - item_height,
						item_height, item_height);
			}