Author: ivanz
Date: 2008-02-11 10:55:05 -0500 (Mon, 11 Feb 2008)
New Revision: 95444
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGridView.cs
Log:
2008-02-11 Ivan N. Zlatev <[EMAIL PROTECTED]>
* PropertyGridView.cs:
- Fix height for drawing the grid entry
text value, so that it clips multiline text properly.
- Fix unfocusing to match MSFT.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-02-11 15:49:46 UTC (rev 95443)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-02-11 15:55:05 UTC (rev 95444)
@@ -1,5 +1,12 @@
2008-02-11 Ivan N. Zlatev <[EMAIL PROTECTED]>
+ * PropertyGridView.cs:
+ - Fix height for drawing the grid entry
+ text value, so that it clips multiline text properly.
+ - Fix unfocusing to match MSFT.
+
+2008-02-11 Ivan N. Zlatev <[EMAIL PROTECTED]>
+
* PropertyGrid.cs: Do not populate subgriditems unless expandable.
Fixes a bug where on repopulation after value changed items become
expandable.
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-11 15:49:46 UTC (rev 95443)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGridView.cs
2008-02-11 15:55:05 UTC (rev 95444)
@@ -260,7 +260,8 @@
&& grid_textbox.Visible) {
switch (keyData) {
case Keys.Enter:
- TrySetEntry (selectedItem,
grid_textbox.Text);
+ if (TrySetEntry (selectedItem,
grid_textbox.Text))
+ UnfocusSelection ();
return true;
case Keys.Escape:
if (selectedItem.IsEditable)
@@ -608,7 +609,8 @@
pevent.Graphics.DrawString (valueText, font,
brush,
new RectangleF (xLoc,
rect.Y + ENTRY_SPACING,
-
ClientRectangle.Width-(xLoc), row_height),string_format);
+
ClientRectangle.Width-(xLoc), row_height - (ENTRY_SPACING*2 + 1)),
+ string_format);
}
private void DrawGridItem (GridEntry grid_item, PaintEventArgs
pevent, int depth, ref int yLoc) {
@@ -699,8 +701,10 @@
void AcceptListBoxSelection (object sender)
{
GridEntry entry = this.property_grid.SelectedGridItem
as GridEntry;
- if (entry != null)
- TrySetEntry (entry, (string) ((ListBox)
sender).SelectedItem);
+ if (entry != null) {
+ if (TrySetEntry (entry, (string) ((ListBox)
sender).SelectedItem))
+ UnfocusSelection ();
+ }
CloseDropDown ();
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches