Skip to content

Commit

Permalink
2008-10-18 Carlos Alberto Cortez <calberto.cortez@gmail.com>
Browse files Browse the repository at this point in the history
	* ListView.cs: If both scrollbars are visible, the vertical one
	shouldn't extend too far down.
	Fixes #435771.


svn path=/trunk/mcs/; revision=116408
  • Loading branch information
carlosalberto committed Oct 19, 2008
1 parent 08ae241 commit 3cb8ab0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
@@ -1,3 +1,9 @@
2008-10-18 Carlos Alberto Cortez <calberto.cortez@gmail.com>

* ListView.cs: If both scrollbars are visible, the vertical one
shouldn't extend too far down.
Fixes #435771.

2008-10-17 Jonathan Pobst <monkey@jpobst.com>

* DataGridView.cs: Add the ability to resize columns and rows with
Expand Down
12 changes: 5 additions & 7 deletions mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
Expand Up @@ -1383,16 +1383,14 @@ private void CalculateScrollBars ()
if (v_scroll.is_visible) {
v_scroll.Location = new Point (client_area.Right - v_scroll.Width, client_area.Y);
v_scroll.Minimum = 0;
v_scroll.Maximum = layout_ht;

// if h_scroll is visible, adjust the maximum of the
// if h_scroll is visible, adjust the height of
// v_scroll to account for the height of h_scroll
if (h_scroll.Visible) {
v_scroll.Maximum = layout_ht + h_scroll.Height;
v_scroll.Height = client_area.Height; // - h_scroll.Height already done
} else {
v_scroll.Maximum = layout_ht;
if (h_scroll.Visible)
v_scroll.Height = client_area.Height - h_scroll.Height;
else
v_scroll.Height = client_area.Height;
}

v_scroll.LargeChange = client_area.Height;
v_scroll.SmallChange = Font.Height;
Expand Down

0 comments on commit 3cb8ab0

Please sign in to comment.