2009-03-12 Carlos Alberto Cortez <calberto.cortez@gmail.com>
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / ChangeLog
index 52f18814af89b4c726cac86a2f2c56fdc4fad692..d138b5a54635538ded666311fd1241cab39665ad 100644 (file)
@@ -1,3 +1,509 @@
+2009-03-12  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * XplatUIX11.cs: In GetMessage when F1 gets pressed, besides sending a
+       WM_HELP message for the associated window, don't call
+       NativeWindow.WndProc *at all*, since this could send a WM_*
+       key-related to Control.WndProc. Also, return the keypress message, in
+       case it needs to be preprocessed for any menu.
+       Fixes #478476.
+
+2009-03-08  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs: When removing the first displayed row and moving 
+       the current cell up one we must invalidate the first displayed row 
+       index before calculating the row heights, etc.
+       [Fixes bug #483202]
+
+2009-03-08  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs: Fix three column bugs:
+          - Rows should be cleared (but not removed) if columns become 0.
+          - The current cell should get moved
+          - ColumnCount increase was adding too many columns.
+
+2009-03-07  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs: Fix RowCount decrease which wasn't working well 
+       in both scenarions - with and without editing row.
+
+2009-03-06  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs: Be compatible with MS in that the scroll to 
+       selection has a synchronous effect. The trick here is that in 
+       order to avoid unnecessary calculations each time a row/column 
+       is added/removed we recalculate the whole grid size just before 
+       just before the scroll to selection.
+       [Fixes bug #482478]
+
+2009-03-06  Carlos Alberto Cortez <calberto.cortez@gmail.com> 
+
+       * RichTextBox.cs: LoadFile(string path) should pass by default
+       RichTextBoxStreamType.RichText, without caring about the detection or
+       extension of the file.
+
+2009-03-06  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * RichTextBox.cs: When calling LoadFile, remove the extra EOL
+       introduced by StreamReader, since it will convert the EOF to an EOL.
+       Fixes #479646.
+
+2009-03-06  Jonathan Pobst  <monkey@jpobst.com>
+
+       * ToolStripDropDownMenu.cs: Use Math.Max instead of calculating
+       preferred size twice.
+
+2009-03-06  Jonathan Pobst  <monkey@jpobst.com>
+
+       * ToolStripMenuItem.cs: Don't draw the dropdown arrow or shortcut
+       string if we aren't on a ToolStripDropDownMenu.
+
+2009-03-06  Jonathan Pobst  <monkey@jpobst.com>
+
+       * ToolStripDropDownButton.cs, ToolStripItem.cs: Refactor some Button
+       code from Item to Button.  Patch from Alex Shulgin.
+
+2009-03-05  Jonathan Pobst  <monkey@jpobst.com>
+
+       * ToolStripDrowDown.cs: Remove some hardcoded values and assumptions.
+       * ToolStripDropDownButton.cs: This should use a ToolStripDropDownMenu,
+       not a ToolStripDropDown.
+       * ToolStripItem.cs: Don't use the item margins on a ToolStripDropDown.
+
+2009-03-04  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs: Fix RowCount/ColumnCount decreasing.
+
+         Based on a patch by Tom Hindle <tom_hindle@sil.org>
+         [Fixes bug #482133]
+
+2009-03-04  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs, DataGridViewElement.cs: 
+          - Always calls OnDataGridViewChanged() if the new DGV is 
+          not the same/null as the current one.
+          - Do not throw NREs when setting TopLeftHeaderCell to null
+          - Unset the DGV for TopLeftHeaderCell when replacing it
+         Based on a patch by Tom Hindle <tom_hindle@sil.org>
+         [Fixes bug #481681]
+
+2009-03-04  Jonathan Pobst  <monkey@jpobst.com>
+
+       * ToolStripDropDown.cs: When dismissing control due to ESC, don't
+       hit a NRE if we are a ContextMenuStrip and do not have a parent.
+       [Fixes bug #478616]
+
+2009-03-01  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ListView.cs: When removing items from a ListViewItemCollection
+       contained in ListView (not in ListViewGroup), before actually removing
+       the items remove them also from their -if any- associated groups. If
+       the item is present in ListViewGroup.Items but not in ListView.Items,
+       then don't remove it - this is *exactly* what .net seems to do.
+       Fixes the remaining bits of #478689.
+
+2009-02-28  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ListView.cs: In our MouseDown handler in ItemControl use the item in
+       the very specific *real* position where the mouse was pressed, using
+       GetItemAtDisplayIndex for that purpose, instead of directly accessing
+       Items - this is specially useful when groups with Details view is
+       used. This is what we do in other places when using groups.
+       Fixes part of #478689.
+
+2009-02-27  Carlos Alberto Cortez <calberto.cortez@gmail.com> 
+
+       * MaskedTextBox.cs: Properly replace selection when a new valid key
+       is pressed - even when IsOverwriteMode is false. This is what .net
+       does.
+
+2009-02-27  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * MaskedTextBox.cs: When setting Text and RejectOnFirstFailure is
+       true, use MaskedTextProvider.Set instead of MaskedTextProvider.Replace, 
+       since Set will keep the previous value in case of error (just what we
+       need), but still call MaskedTextProvider.Clear if
+       RejectOnFirstFailure is false - match .net.
+
+2009-02-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * MaskedTextBox.cs: When setting Text use the very precise algorithm
+       that .net uses: iterate over every char of the new value, trying to
+       use every char, and use a normal call to MaskedTextProvider.Replace
+       call if RejectInputOnFirstFailure is true. Fire OnMaskInputRejected 
+       in case of error in both cases, as well.
+       Fixes #477408.
+
+2009-02-25  Neville Gao  <nevillegao@gmail.com>
+
+       * ColorDialog.cs: Added UIA Framwork Property:
+       UIASelectedSmallColorControl.
+
+2009-02-25  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * MaskedTextBox.cs: Forgot to update the call of the new method
+       introduces in the previous patch.
+
+2009-02-25  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * MaskedTextBox.cs: Handle OnKeyDown to properly process the Delete
+       key. Also create a new method to avoid code duplication between
+       OnKeyDown and OnKeyPress.
+       Fixes #477388.
+
+2009-02-24  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridViewCell.cs: Invalidate the datagrid when the cell is selected 
+       or deselected.
+       [Fixes bug #479124]
+
+2009-02-23  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * MaskedTextBox.cs: In OnKeyPress the IsOverwriteMode check is
+       actually inversed, so put it the right way. Also, don't automatically
+       look for the next editable item after adding a new one, but way for
+       the next insertion (this is what .net does) - this is not needed when
+       MaskedTextProvider.InsertAt is called however, since it already looks for the
+       next editable position.
+       Fixes the remaining bits of #477383.
+
+2009-02-23  Carlos Alberto Cortez <calberto.cortez@gmail.com> 
+
+       * MaskedTextBox.cs: In OnKeyPress handle backspace by calling
+       MaskedTextProvider.RemoveAt method. Also for setting the SelectionStart
+       property after the text was modified, adjust the testPosition value
+       depending on what method was called.
+       Fixes part of #477383.
+
+2009-02-23  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ListView.cs: For EnsureVisible, adjust the view port bounds based on
+       the existence of the column headers, as well as using this information
+       to adjust the vscrollbar value, so items never get hidden by the
+       column headers.
+       Fixes #478498.
+
+2009-02-23  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs: Make the ScrollBars property work properly.
+
+2009-02-22  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * TextBox.cs: Some code lifting for AutoComplete's support. First,
+       when handling non-navigation keys, save the original Text typed by the
+       user, and don't motify it BEFORE. This was a design mistake, since the
+       re-assignation happens only when navigating the append/suggest list,
+       not while creating the matches. Also, process the Delete key just like 
+       the backspace one. Finally, when handling WM_CHAR, ignore both Escape
+       and Enter keys.
+       Fixes some missing bits of #469967.
+
+2009-02-22  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs: Fix row removal in the data-bound scenario.
+
+2009-02-19  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridViewCell.cs: Use strict equality comparison in order to 
+       prevent superfluous CellValueChanged events.
+
+2009-02-19  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs: Do not reset the columns when the data list changes, 
+       but only the rows. Fixes multiple bugs related to sorting, custom 
+       column styles being reset and more.
+
+2009-02-19  Jonathan Pobst  <monkey@jpobst.com>
+
+       * ThemeWin32Classic.cs: Respect a PictureBox's Padding when
+       drawing the image.
+
+2009-02-18  Andrés G. Aragoneses  <aaragoneses@novell.com>
+
+       * ToolBarButton.cs: Oops, use the correct event (fix r127298).
+
+2009-02-17  Andrés G. Aragoneses  <aaragoneses@novell.com>
+
+       * ToolBarButton.cs: Event for Enabled property (needed to fix
+         UIA #474197).
+
+2009-02-16  Carlos Alberto Cortez <calberto.cortez@gmail.com> 
+
+       * TextBox.cs: When handling WndProc with autocomplete activated,
+       event if the new text is not causing any change in the look up
+       algorithm, save it as we normally do when numbers and letters.
+       Fixes #469967.
+
+2009-02-16  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * TreeNode.cs: When Text/StateImageIndex/StateImageKey/NodeFont change
+       Invalidate the proper bounds in the TreeView, not only resetting the
+       width.
+       Fixes #475542.
+
+2009-02-09  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * TreeNode.cs: Don't return TreeView.BackColor when retrieving our own
+       BackColor property. This is what .net does in both 1.1 and 2.0.
+       * TreeView.cs: When selected_node is not the same as highlighted_node,
+       we need to handle the back color in a different way, trying to use the
+       node's BackColor if it's not Color.Empty.
+       Fixes #464200.
+
+2009-02-09  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * TreeView.cs: When canceling selection in our MouseUp handler,
+       invalidate also the previous selected node bounds.
+       Fixes #464191.
+
+2009-02-07  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs: End or if end fails then cancel the current edit 
+       operation before clearing the data source.
+
+2009-02-07  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs: Data-bind only after the handle is created.
+       [Fixes bug #473680]
+
+2009-02-06  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * TreeView.cs: When handling the MouseMove event, check if
+       focused_node and selected_node fields are null - usually they are non
+       null, since we have always a selected node, but canceling selection by
+       handling BeforeSelect event leaves the two of them as null.
+       Fixes #470451.
+
+2009-02-06  Neville Gao  <nevillegao@gmail.com>
+
+       * TabControl.cs: Control enabled to support accessibility.
+       [Fixes Bug #472428]
+
+2009-02-05  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridViewRowCollection.cs, DataGridView.cs: Fix row insertation: 
+          - Use ArrayList.Insert instead of the Item property so that the item 
+          is actually inserted and not an existing item replaced.
+          - Call DataGridView.OnRowsAddedInternal and drop internal from 
+          OnRowsAdded for binary compitability. This also fixes several 
+          redrawing issues.
+       [Fixes bug #472968]
+
+2009-02-05  Andrés G. Aragoneses  <aaragoneses@novell.com>
+
+       * ToolBarButton.cs: Doh, fire OnUIATextChanged *after* setting
+         the value.
+
+2009-02-04  Andrés G. Aragoneses  <aaragoneses@novell.com>
+
+       * ToolBarButton.cs: Add another event (OnUIATextChanged).
+
+2009-02-04  Andrés G. Aragoneses  <aaragoneses@novell.com>
+
+       * ToolBarButton: Fix typo in previous commit (r125704).
+
+2009-02-04  Andrés G. Aragoneses  <aaragoneses@novell.com>
+
+       * ToolBar.cs, ToolBarButton.cs: Add new UIA events to know
+       when a button gets focus, firing the events from the ToolBar.
+       r: jpobst
+
+2009-02-04  Mario Carrion  <mcarrion@novell.com>
+
+       * ColumnHeader.cs: Raising ListView.ColumnWidthChanged when setting 
+       Width.
+       * ListView.cs: Internal method added: RaiseColumnWidthChanged, used by
+       ColumnHeader to raise ColumnWidthChanged.
+       [Fixes Bug #467086]
+
+2009-02-03  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridViewRowCollection.cs, DataGridView.cs: Move row completion 
+       code in the row collection code, so that the completion happens before 
+       the CollectionChanged event, also better encapsulation.
+       [Fixes bug #471987]
+
+2009-02-02  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs: When editing is finished do not remove the editing 
+       row, because it has already become a real one. Instead add a new one.
+       [Fixes bug #471754]
+
+2009-02-02  Carlos Alberto Cortez <calberto.cortez@gmail.com> 
+
+       * TreeView.cs: When drawing the node's image, check that the index
+       specified by the node is valid for the ImageList.
+       Fixes #471094.
+
+2009-02-02  Andrés G. Aragoneses  <aaragoneses@novell.com>
+
+       * ToolBar.cs: Add new UIAPerformClick method to be called by
+       UIAutomationWinforms when someone calls Invoke() on the
+       ToolBarButtonProvider. r: jpobst
+
+2009-02-02  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * XplatUIX11.cs: Don't send a WM_SHOWWINDOW message when receiving
+       MapNotify/UnmapNotify events - we are already firing those events in
+       the proper places, so we avoid this way to send the same message two
+       times. I'm leaving the handling code in case we could break something
+       in the future, as this change seems dangerous (but needed).
+       Fixes #467546.
+
+2009-02-01  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs: Complete incomplete rows when they are added to 
+       the grid.
+       [Fixes bug #471068]
+
+2009-02-01  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs, DataGridViewColumnCollection.cs: Ensure that the 
+       binding is cleared prior to setting it to null. Fixes a regression 
+       causing exceptions when the DataSource is set to null and then set 
+       again to a data source.
+
+2009-02-01  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs, DataGridViewImageColumn.cs, DataGridViewCell.cs: 
+          - Make Image/Bitmap cells work.
+          - Handle images with size greater than the cell.
+          - Default to MiddleCenter alignment for image cells.
+       [Fixes bug #471101]
+
+2009-01-30  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * UpDownBase.cs: Force Height to PreferredHeight.
+
+2009-01-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * XplatUIX11.cs: We should use utf8 handling clipboard transference
+       with other x11 applications, and use utf16 when handling clipboard
+       data in the class library. Update the related points as well.
+       Fixes #468683.
+
+2009-01-28  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridViewCell.cs: Format strings according to the supplied 
+       CellStyle.Format.
+       [Fixes bug #470384]
+
+2009-01-28  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs: Reset the hover cell if it gets moved due to row(s) 
+       addition or removal. Fixes multiple crashes in OnMouseMove.
+
+2009-01-27  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs: Fix a NRE when setting the CurrentCell to null.
+
+2009-01-27  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * XplatUIX11.cs: Fire Timer.Tick even if there is no MainForm for the 
+       current context.
+       [Fixes bug #469239]
+
+2009-01-26  Andreia Gaita  <avidigal@novell.com>
+
+       * WebBrowser.cs: fix initial value of ScrollbarsEnabled, so they
+       won't be disabled by default.
+       Fixes #468690
+
+2009-01-26  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs: Do not clear the rows if we are not databound.
+
+2009-01-26  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs: Do not be too smart about selecting the first cell 
+       when the first row is added as this is not what MS does. Fixes the 
+       failing unit tests.
+
+2009-01-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * TreeNode.cs: NextVisibleNode and PrevVisibleNode properties don't
+       take into account the fact that OpenTreeNodeEnumerator needs to call
+       MoveNext/MovePrevious to actually put the passed node as the one
+       retrieved in Current. This way this property should work as really
+       expected in .net.
+       Fixes part of #467225.
+
+2000-01-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * TreeView.cs: When calculating the scrollbars, don't use
+       TreeNode.Bounds, since it still can have the values of the previous
+       -and now invalid- layout -which depends on TreeView.skipped_nodes, and
+       could not have been updated as well-, and use the actual number of
+       visible number of nodes to compute the height needed to contain all
+       the nodes. Also reset the value of vbar to 0 when disabled - this way
+       we make sure that, when re-enabled, it will update the visible area of
+       the treeview, even if the previous value before disabling it is the
+       same as now. Finally don't do anything for the vbar.ValueChanged
+       handler - for the case wheer we manually set the value but don't the
+       vbar is disabled already.
+       Fixes part of #467225.
+
+2009-01-23  Jonathan Pobst  <monkey@jpobst.com>
+
+       * ToolStrip.cs: Switch from foreach to for, in case the collection
+       somehow changes while enumerating it.
+
+2009-01-23  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs, DataGridViewCell.cs: Fix crashes when there is no 
+       editing control.
+
+2009-01-23  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridView.cs: Fix new row adding/editing in the non-databound 
+       scenario.
+
+2009-01-21  Mike Gorse  <mgorse@novell.com>
+
+       * TrackBar.cs: Make LargeIncrement/Decrement internal so that UIA can
+         use them.
+         Added UIAValueParamChangedEvent.
+
+2009-01-21  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * TreeView.cs: In CollapseAll, set vbar to the maximum value, instead
+       of trying to set as top node the highest parent of the previous top
+       node. Moving to the bottom of the TreeView after a call to CollapseAll
+       is exactly what .net does. This should avoid some nasty issue when
+       CollapseAll is called and we don't need the vertical scroll bar.
+
+2009-01-21  Mario Carrion <mcarrion@novell.com>
+
+       * Form.cs: UIA Support: Internal events added: UIAWindowStateChanged
+       and UIATopMostChanged.
+
+2009-01-21  Sandy Armstrong  <sanfordarmstrong@gmail.com>
+
+       * MenuItem.cs: Add UIACheckChanged, UIARadioCheckChanged,
+       UIAEnabledChanged, and UIATextChanged events.
+
+       * Form.cs: Add UIAMenuChanged event.
+
+       * Menu.cs:
+       * MenuAPI.cs: Note which internal APIs are being used by UIA.
+
+2009-01-21  Neville Gao  <nevillegao@gmail.com>
+
+       * ToolBar.cs: Control enabled to support accessibility.
+       [Fixes Bug #455950]
+
+2009-01-19  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * TreeView.cs: When handling mouse up event, check whether
+       highlighted_node is null or not - usually it should be non-null
+       alwaays, since the mouse down handler sets it, but some externa
+       operations, such TreeNodeCollection.Clear, could set it to null.
+       Fixes #438650.
+
+2009-01-19  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * ThemeWin32Classic.cs: Draw the menu item shortcut even if the menu 
+       item is disabled.
+
 2009-01-19  Ivan N. Zlatev  <contact@i-nz.net>
 
        * MenuAPI.cs: Do not handle shortcuts if the menu item is disabled.