Author: ivanz
Date: 2008-02-17 09:04:01 -0500 (Sun, 17 Feb 2008)
New Revision: 95968
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/GridEntry.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGridView.cs
Log:
2008-02-17 Ivan N. Zlatev <[EMAIL PROTECTED]>
* GridEntry.cs: Set expanded state before notifying that the
expansion has taken place.
* PropertyGridView.cs:
- Set the propertygridtextbox text to the selected
StandardValue before proceeding to setting it.
- Scrolling bugfixes.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-02-17 13:57:36 UTC (rev 95967)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-02-17 14:04:01 UTC (rev 95968)
@@ -1,3 +1,12 @@
+2008-02-17 Ivan N. Zlatev <[EMAIL PROTECTED]>
+
+ * GridEntry.cs: Set expanded state before notifying that the
+ expansion has taken place.
+ * PropertyGridView.cs:
+ - Set the propertygridtextbox text to the selected
+ StandardValue before proceeding to setting it.
+ - Scrolling bugfixes.
+
2008-02-16 Ivan N. Zlatev <[EMAIL PROTECTED]>
* GridEntry.cs:
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/GridEntry.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/GridEntry.cs
2008-02-17 13:57:36 UTC (rev 95967)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/GridEntry.cs
2008-02-17 14:04:01 UTC (rev 95968)
@@ -84,11 +84,11 @@
get { return expanded; }
set {
if (expanded != value) {
+ expanded = value;
if (value)
property_grid.OnExpandItem
(this);
else
property_grid.OnCollapseItem
(this);
- expanded = value;
}
}
}
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGridView.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGridView.cs
2008-02-17 13:57:36 UTC (rev 95967)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGridView.cs
2008-02-17 14:04:01 UTC (rev 95968)
@@ -52,7 +52,6 @@
private PropertyGridTextBox grid_textbox;
private PropertyGrid property_grid;
private bool resizing_grid;
- private int skipped_grid_items;
private PropertyGridDropDown dropdown_form;
private Form dialog_form;
private ImplicitVScrollBar vbar;
@@ -83,7 +82,6 @@
dialog_form.FormBorderStyle = FormBorderStyle.None;
dialog_form.ShowInTaskbar = false;
- skipped_grid_items = 0;
row_height = Font.Height + font_height_padding;
grid_textbox.Visible = false;
@@ -735,6 +733,7 @@
{
GridEntry entry = this.property_grid.SelectedGridItem
as GridEntry;
if (entry != null) {
+ grid_textbox.Text = (string) ((ListBox)
sender).SelectedItem;
if (TrySetEntry (entry, (string) ((ListBox)
sender).SelectedItem))
UnfocusSelection ();
}
@@ -787,17 +786,6 @@
private void VScrollBar_HandleValueChanged (object sender,
EventArgs e)
{
- if (vbar.Value <= 0)
- vbar.Value = 0;
- if (vbar.Value >
vbar.Maximum-ClientRectangle.Height/row_height)
- vbar.Value =
vbar.Maximum-ClientRectangle.Height/row_height+1;
-
- int scroll_amount =
(skipped_grid_items-vbar.Value)*row_height;
-
- if (scroll_amount == 0)
- return;
-
- skipped_grid_items = vbar.Value;
UpdateView ();
}
@@ -846,7 +834,7 @@
CalculateItemY (entry,
property_grid.RootGridItem.GridItems, ref y);
int x = SplitterLocation + ENTRY_SPACING +
(entry.PaintValueSupported ? VALUE_PAINT_INDENT : 0);
grid_textbox.SetBounds (x + ENTRY_SPACING, y +
ENTRY_SPACING,
- ClientRectangle.Width -
ENTRY_SPACING - x - (vbar.Visible ? vbar.Width : 0),
+ ClientRectangle.Width -
ENTRY_SPACING - x - (GetScrollBarVisible () ? vbar.Width : 0),
row_height -
ENTRY_SPACING);
grid_textbox.Text = entry.IsMerged &&
!entry.HasMergedValue ? String.Empty : entry.ValueText;
grid_textbox.Visible = true;
@@ -909,11 +897,13 @@
internal void ExpandItem (GridEntry item)
{
+ UpdateItem ((GridEntry)property_grid.SelectedGridItem);
Invalidate (new Rectangle (0, item.Top, Width, Height -
item.Top));
}
internal void CollapseItem (GridEntry item)
{
+ UpdateItem ((GridEntry)property_grid.SelectedGridItem);
Invalidate (new Rectangle (0, item.Top, Width, Height -
item.Top));
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches