2007-08-28 Jonathan Pobst <monkey@jpobst.com>
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / ChangeLog
index 6f4127328bc665ee7df3a5f6dcb2ad869234f0ab..b0d98eab8838b125900670d5eaaeac4430305b0f 100644 (file)
@@ -1,3 +1,526 @@
+2007-08-28  Jonathan Pobst  <monkey@jpobst.com>
+
+       * Control.cs, XPlatUI.cs, XPlatUIDriver.cs, XPlatUIWin32.cs: Implement
+       IsKeyLocked.
+
+2007-08-28  Jonathan Pobst  <monkey@jpobst.com>
+
+       * Cursor.cs: Add HotSpot, hook into XPlatUI.GetCursorInfo.
+       * XPlatUIWin32.cs: Implement hotspot lookup in GetCursorInfo.
+
+2007-08-28  Jonathan Pobst  <monkey@jpobst.com>
+
+       * RadioButton.cs: Use 2.0 rendering.  Use base implementation of TextAlign.
+       * Theme.cs, ThemeWin32Classic.cs: Implement 2.0 rendering for RadioButton.
+
+2007-08-27  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * CursorConverter.cs: Implement conversion to InstanceDescriptor.
+
+2007-08-27  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * GridEntry.cs: Implement GetService.
+
+2007-08-27  Jonathan Pobst  <monkey@jpobst.com>
+
+       * LabelEditTextBox.cs, TreeView.cs: After hiding the textbox used
+       for label editting, make sure we focus back on the TreeView.
+       [Fixes bug #82590]
+
+2007-08-27  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ListView.cs: Add some 2.0 overrides.
+
+2007-08-27  Everaldo Canuto  <ecanuto@novell.com>
+
+       * Form.cs: Uses opacity var instead of Opacity property in CreateHandle
+       because getter dont returns right value before handle creation. Thanks 
+       to George. Fixes #82569.  
+
+2007-08-27  Everaldo Canuto  <ecanuto@novell.com>
+
+       * Theme.cs: Revert last patch, it causes error under win32. 
+
+2007-08-27  Everaldo Canuto  <ecanuto@novell.com>
+
+       * Theme.cs: Uses Environment.SpecialFolder.DesktopDirectory instead of 
+       Environment.SpecialFolder.Desktop in Places method, Desktop returns the 
+       logical Desktop rather than the physical file system location. Fixes #82603. 
+
+2007-08-26  Everaldo Canuto  <ecanuto@novell.com>
+
+       * MessageBox.cs: Add clipboard copy (ctrl+c) to messagebox. Thanks Andy Hume
+       for the patch. Fixes #82568.
+
+2007-08-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ListView.cs: Add a pair of missing 2.0 ListViewItemCollection.Insert
+       methods.
+
+2007-08-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ListViewInsertionMark.cs: New stubbed class.
+
+2007-08-25  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * FolderBrowserDialog.cs: When adding folder, immediately create the
+       directory with temporary name and rename the directory when editing
+       finishes. This matches MS. Ensure the node for the new folder is 
+       selected and LabelEdit is disabled, when editing is either finished
+       or cancelled.
+
+2007-08-25  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * TreeView.cs: When editing label of node, ensure node is visible.
+
+2007-08-25  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * PropertyGridView.cs: Set the value only if it has changed.
+
+2007-08-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ListView.cs: Some more code refactoring to add support sorting
+       with groups (now for Details view). Remove unused code also.
+
+2007-08-24  Jonathan Pobst  <monkey@jpobst.com>
+
+       * NodeLabelEditEventArgs.cs: EndEdit immediately when CancelEdit is called.
+       Not a big fan of reacting immediately to a field in an EventArg, but that's
+       the way it's done.  (This is part of the previous commit that got left out.)
+
+2007-08-25  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * FolderBrowserDialog.cs: Removed need for separate description field.
+       Replaced "" with string.Empty. Fixed tabindex. Ensure OK button
+       has focus when dialog box is displayed again, regardless of what
+       button was pressed the previous time. Set RootFolder and SelectedPath
+       each time dialog box is displayed. This ensures the treeview is
+       refreshed, and fixes bug #82579. Do no hide selected node in TreeView
+       when it does not have focus. Added support for more special folders.
+
+2007-08-24  Jonathan Pobst  <monkey@jpobst.com>
+
+       * TreeView.cs: Create a CancelEdit method.  Clone the edit_args in EndEdit
+       before calling AfterLabelEdit.  If the user calls BeginEdit in that event,
+       it resets the edit_args.
+       * TreeNode.cs: Call CancelEdit if the user passes cancel = true to EndEdit.
+       [Fixes bug #82577]
+
+2007-08-24  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * FolderBrowserDialog.cs: Modifies form caption and text of new folder
+       button to match MS. Provide more meaningful exception message for
+       invalid RootFolder value. Use zero-length string when SelectedPath
+       is set to null. Allow non-rooted paths in SelectedPath, but ignore
+       them in FolderBrowserTreeView. Allow folders to be created in
+       RootFolder. Fixes bug #82576.
+
+2007-08-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ListView.cs: Correctly compute the layout_ht (height) when using groups,
+       since we need to take into account the group headers and the margin
+       between them.
+       * ListViewGroup.cs: Add a rows field to store the number of rows per
+       group.
+
+2007-08-24  Rolf Bjarne Kvinge <RKvinge@novell.com> 
+
+       * DateTimePicker.cs: The MS' MTB has a really stupid year formatting.
+         Anyways, let's just follow the lead.
+
+2007-08-24  Jonathan Pobst  <monkey@jpobst.com>
+
+       * CheckBox.cs: Set the AutoSizeMode to GrowAndShrink.
+       * Form.cs, GroupBox.cs: Don't skip Right or Bottom anchored 
+       controls in GetPreferredSizeCore.
+       * ThemeWin32Classic.cs: Tweak text drawing of CheckBoxes.
+       [Fixes bug #82488]
+
+2007-08-24  Jonathan Pobst  <monkey@jpobst.com>
+
+       * PrintDialog.cs: Need to instantiate the form variable here too.
+
+2007-08-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ListView.cs: Do some reorganization to support sorting in groups,
+       by doing the layout sequentially in ListView.Items. Also add support
+       for the Default Group, which should be available for items with no
+       group assigned.
+       * ListViewGroup.cs: Add support for DefaultGroup. Include new members
+       for storing layout info also.
+       * ListViewGroupCollection.cs: Add a DefaultGroup as part of the
+       collection, as well as providing internal members to do a traversal
+       including the default group (needed when doing layout/drawing).
+       * ThemeWin32Classic.cs: When drawing group headers use internal
+       ListViewGroupCollection members to take into account the default
+       group.
+
+2007-08-23  George Giolfan  <georgegiolfan@yahoo.com>
+
+       * FlowLayoutPanel.cs: Add GetPreferredSizeCore.  [Fixes bug #82537]
+
+2007-08-23  Jonathan Pobst  <monkey@jpobst.com>
+
+       * TreeView.cs: IsInputKey: don't ask for any keys if the handle hasn't
+       been created.  If handle is created, we want arror keys.  If we are editing
+       a node, we want things like enter, esc, home, end, page up, page down.
+       Allows Esc to work for FolderBrowserDialog.
+
+2007-08-23  Jonathan Pobst  <monkey@jpobst.com>
+
+       * ColorDialog.cs, FontDialog.cs: Set the form's CancelButton so that
+       they close when ESC is pressed.  Thanks Andy!
+
+2007-08-23  Jonathan Pobst  <monkey@jpobst.com>
+
+       * CommonDialog.cs: Do not instantiate form, leave that for derived classes.
+       This way we can tell if this is a CommonDialog provided with mono, or one
+       that is being implemented outside by a developer.  If it is an external one,
+       the developer is responsible for showing their own form.  We were showing
+       our blank form after the developer showed his.
+       * ColorDialog.cs, FileDialog.cs, FolderBrowserDialog.cs, FontDialog.cs,
+       PageSetupDialog.cs: Instantiate form variable in our constructor.
+       [Fixes bug #82531]
+
+2007-08-23  Jonathan Pobst  <monkey@jpobst.com>
+
+       * ListBox.cs, ListView.cs, TreeView.cs: Override IsInputCharInternal
+       and always return true.  [Fixes bug #81616]
+
+2007-08-23  Jonathan Pobst  <monkey@jpobst.com>
+
+       * TextBoxBase.cs: Allow 2.0 AutoSize to change the height of the
+       TextBox.  [Fixes bug #82549]
+
+2007-08-23  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * FileDialog.cs: When Save/Open is clicked and no filename is selected
+       or entered then do not close the dialog. Fixes bug #82539. Removed
+       CWLs.
+
+2007-08-22  Everaldo Canuto  <ecanuto@novell.com>
+
+       * FileDialog.cs: Create UpdateRecentFiles and move the recent files refresh
+       code to this method. It is calling every time filter changes. This method
+       will help to fix the bug #80887.
+
+2007-08-22  Jonathan Pobst  <monkey@jpobst.com>
+
+       * CheckBox.cs: Implement AutoSize calculation.
+
+2007-08-22  Jonathan Pobst  <monkey@jpobst.com>
+
+       * CheckBox.cs: Use new 2.0 rendering for 2.0.
+       * Theme.cs: Method declarations for 2.0 rendering path.
+       * ThemeWin32Classic.cs: 2.0 rendering implementation for CheckBox.
+
+2007-08-21  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ListViewGroupCollection.cs: Fix a typo of the previous patch.
+
+2007-08-21  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ListViewGroupCollection.cs: Implement AddRange the right way, to
+       only call Redraw on the parent one time.
+
+2007-08-21  Rolf Bjarne Kvinge <RKvinge@novell.com> 
+
+       * DataGridViewRowHeaderCell.cs, DataGridViewColumnHeaderCell.cs: Implemented
+         GetClipboardContent.
+       * DataGridViewCell.cs: Implemented GetClipboardContent,
+         GetEditedFormattedValue, GetFormattedValue.
+       * DataGridView.cs: Implemented GetClipboardContent, TopLeftHeaderCell.
+
+2007-08-21  Jonathan Pobst  <monkey@jpobst.com>
+
+       * TableLayoutStyleCollection.cs: corcompare fix.
+
+2007-08-21  Rolf Bjarne Kvinge <RKvinge@novell.com> 
+
+       * DataObject.cs: Implemented retrieval of convertible / not convertible
+         objects.
+
+2007-08-21  Jonathan Pobst  <monkey@jpobst.com>
+
+       * ToolStripItem.cs: When changing the item's text, invalidate before we resize
+       ourselves.  This ensures the entire old bounds are repainted, in case our new
+       size is smaller.  [Fixes bug #82518]
+
+2007-08-20  Everaldo Canuto  <ecanuto@novell.com>
+
+       * XplatUIX11.cs: Apply patch from #81588, it makes use of PointerMotionHintMask
+       flag to make fast handle of mouse events, without this the mouse move is
+       handled in some manner, whether it is a mouse move or not. Fixes #81588.
+
+2007-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ListView.cs: When doing layout calculations don't use a ref
+       param to keep the current item; instead use its Index value (this 
+       is specially important when doing the layout with Groups
+       and Items being sparse). Also don't take into account items added to
+       the Group but not yet added to the main ListView.Items collection.
+
+2007-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ListViewGroupCollection.cs: Forgot to mimic an issue
+       in the indexer (don't assign the ListView owner for new values).
+
+2007-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ListViewGroupCollection.cs: Make the string indexer use
+       the int based indexer to re-use code, instead of duplicate the code.
+       Also Redraw as needed and take into account null values.
+
+2007-08-20  Jonathan Pobst  <monkey@jpobst.com>
+
+       * StatusStrip.cs: Make sure the item's parent gets set in SetDisplayedItems.
+       [Fixes bug #82481]
+
+2007-08-20  Jonathan Pobst  <monkey@jpobst.com>
+
+       * ToolStrip.cs: Add some logic to un-focus controls in ToolStripControlHosts
+       when other buttons are clicked or navigated to.
+
+2007-08-20  Rolf Bjarne Kvinge <RKvinge@novell.com> 
+
+       * XplatUIX11.cs: Treat toolwindows as if they had no window manager, since
+         it's XplatUIX11 that attaches them.
+
+2007-08-20  Rolf Bjarne Kvinge <RKvinge@novell.com> 
+
+       * DataGridView.cs: If a column has been added, recreate the editing row.
+         Fixes #82226.
+
+2007-08-20  Rolf Bjarne Kvinge <RKvinge@novell.com> 
+
+       * TextControl.cs: Use Math.Max instead of Math.Min when deciding the length
+         of the tag to draw. Makes disappearing text show up again.
+
+2007-08-20  Rolf Bjarne Kvinge <RKvinge@novell.com> 
+
+       * StatusBar.cs: Take into account any icons when a panel has AutoSize =
+         Contents. Fixes #82487.
+
+2007-08-19  Andreia Gaita  <avidigal@novell.com>
+
+       * Added HtmlElement.cs, HtmlElementCollection.cs, 
+         HtmlElementEventArgs.cs, HtmlElementEventHandler.cs
+         
+2007-08-19  Andreia Gaita  <avidigal@novell.com>
+
+       * BindingSource.cs: Implement this, dispose and getenumerator.
+       * DataGridViewRowCollection.cs: Move the InvalidOperationException
+       out of AddInternal, throw it only on public Add calls. The 
+       UsingWebBrowser sample was blowing up with this when setting the
+       DataSource after adding DataBindings, so it's likely that .net
+       only throws this exception when Add is called directly. 
+       
+       * ToolStripControlHost.cs: Return the hosted control's text
+       property, and not the ToolStripItem one (it would always return
+       the initial value).
+       
+       * HtmlDocument.cs: Implement GetElementById and All
+       * WebBrowser.cs: Remove exception on set_DocumentStream.        
+
+2007-08-19  Everaldo Canuto  <ecanuto@novell.com>
+
+       * Form.cs: Fix the max and min value for opacity (0~1).
+
+2007-08-19  Everaldo Canuto  <ecanuto@novell.com>
+
+       [Fixes #80118]
+       * DataGridTableStyle.cs: Default header font is now null, on getter it 
+       returns datagrid font when is null. On setter permits null.
+
+       * DataGrid.cs:
+       - When ResetHeaderFont set header font to null.
+       - On EndInit set grid_style.DataGrid.
+
+2007-08-19  Everaldo Canuto  <ecanuto@novell.com>
+
+       * TabControl.cs: Fix regression in default padding x.
+
+2007-08-19  Everaldo Canuto  <ecanuto@novell.com>
+
+       * TabControl.cs: Fix tab page text area removing padding. Fixes #82471.
+
+2007-08-19  Everaldo Canuto  <ecanuto@novell.com>
+
+       * TabControl.cs: Fix first tab drawing, when selected it must have x = 0
+       not 2. Fixes #82229.
+
+2007-08-18  Everaldo Canuto  <ecanuto@novell.com>
+
+       * TabControl.cs: Fix tab size when image height is less than text height.
+       Partially fixes #81837.
+
+2007-08-18  Everaldo Canuto  <ecanuto@novell.com>
+
+       * Form.cs: Add WS_EX_CONTROLPARENT to forms to make it selectable using 
+       "alt + tab". It works only for Win32, for X11 theres no way to remove window
+       from taskbar and keep it on "alt_tab". Fixes #81722.
+
+2007-08-18  Everaldo Canuto  <ecanuto@novell.com>
+
+       * XplatUIX11.cs: Apply patch from Jurek Bartuszek to fix DrawReversibleFrame
+       and DrawReversibleLine, also apply same behavior to FillReversibleRectangle. 
+       Fixes #80877 and #79418.
+
+2007-08-18  Everaldo Canuto  <ecanuto@novell.com>
+
+       * MenuAPI.cs: Fix popup menu position when the size is larger than distance 
+       between position and one of the screen borders. Fixes #82349.
+
+2007-08-18  Everaldo Canuto  <ecanuto@novell.com>
+
+       * MessageBox.cs: When there is no form that invoked the MessageBox, shows
+       the MessageBox in the taskbar. Fixes #82457.
+
+2007-08-18  Everaldo Canuto  <ecanuto@novell.com>
+
+       * MessageBox.cs: Fix form size when icon is set and text height is bigger
+       than icon. Fixes #82468.
+
+2007-08-18  Rolf Bjarne Kvinge <RKvinge@novell.com> 
+
+       * ThemeWin32Classic.cs: A FixedToolWindow has border size 3.
+       * InternalWindowManager.cs: Change HandleCalcSize to return a boolean value
+         if handled or not. Implement WM_NCCALCSIZE for WParam == 0 as well.
+         Refactored HandleNCCalcSize somewhat to avoid code duplication.
+       * Form.cs: Add is_clientsize_set, set in set_ClientSize, used by
+         FormBorderStyle to decide if we're calculating a new size from the
+         client size or not. CreateParams: Don't fake tool windows, only the X11
+         backend manages toolwindows manually.
+
+2007-08-17  Jonathan Pobst  <monkey@jpobst.com>
+
+       * Form.cs: Only reset is_visible if !IsDisposed to prevent an
+       ObjectDisposedException.
+
+2007-08-17  Jonathan Pobst  <monkey@jpobst.com>
+
+       * Form.cs: Reset is_visible back to true after OnLoad.  Setting this
+       in OnLoad should not have any effect.  [Fixes bug #82470]
+
+2007-08-17  Jonathan Pobst  <monkey@jpobst.com>
+
+       * ToolTip.cs: Add a hack to ToolTipWindow so it will still size and
+       paint for controls that create their own ToolTipWindow instead of
+       going through ToolTip.
+
+2007-08-17  Jonathan Pobst  <monkey@jpobst.com>
+
+       * ToolTip.cs: Make Hide internal instead of public to match MS API.
+
+2007-08-17  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ListViewGroupCollection.cs: Use generic List instead of an
+       ArrayList, since this collection is 2.0 only.
+
+2007-08-17  Jeffrey Stedfast  <fejj@novell.com>
+
+       * ToolTip.cs (Hide): Made public to make the build work (should
+       this not be public?).
+
+2007-08-17  Jonathan Pobst  <monkey@jpobst.com>
+
+       * ToolBar.cs, ToolStrip.cs, TreeView.cs: Use a ToolTip instead of a
+       ToolTipWindow.
+       * ToolTip.cs: Add an internal Visible property to facilitate transition.
+
+2007-08-17  Jonathan Pobst  <monkey@jpobst.com>
+
+       * DrawToolTipEventArgs.cs, DrawToolTipEventHandler.cs, PopupEventArgs.cs,
+       PopupEventHandler.cs: Make these internal for 1.1.
+       * ThemeClearlooks.cs, ThemeWin32Classic.cs: Use TextRenderer, and modify to not
+       use ToolTipWindow internals.
+       * ToolTip.cs: Add 2.0 modal Show methods.  Had to move a lot of stuff around to
+       support this.  A lot of stuff in the ToolTipWindow got moved to the ToolTip.
+
+2007-08-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 
+
+       * X11Dnd.cs: Add a null check.
+
+2007-08-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 
+
+       * X11Dnd.cs: MwfWindow: Try to load the control directly from the handle if
+         nothing else succeeds. Fixes #82453.
+
+2007-08-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 
+
+       * XplatUIWin32.cs: PaintEventStart: validate the entire source client
+         rectangle if we're painting to another window than the one the paint
+         message was generated on. Simplify the code somewhat, which makes
+         PaintEventEnd also simpler.
+
+2007-08-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 
+
+       * Control.cs: When changing parent of a form, let the form decide whether
+         XplatUI.SetParent should be called or not.
+       * Form.cs: ChangingParent: only call XplatUI.SetParent if we're not
+         recreating the handle. If the new parent's handle isn't created, don't
+         recreate our handle, just destroy it. CreateParams: Check if the
+         parent's handle is created before fetching it.
+
+2007-08-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 
+
+       * Control.cs, Form.cs, InternalWindowManager.cs, MainMenu.cs, MdiClient.cs:
+         Update calls to PaintEventStart/End to take a Message argument.
+       * XplatUI.cs, XplatUIDriver.cs, XplatUIOSX.cs: Update PaintEventStart/End to
+         take a Message argument.
+       * XplatUIWin32.cs, XplatUIX11.cs: Update PaintEventStart/End to take a
+         Message argument, and handle the case where we don't paint to the window
+         for which the paint message was generated.
+
+2007-08-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 
+
+       * XplatUIWin32.cs: Don't call Win32GetLastError directly, use
+         Marshal.GetLastWin32Error. Plug nasty memory leak in
+         PaintEventStart/End, we were creating a DC we weren't releasing.
+
+2007-08-17  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ListView.cs: Add Groups support in Details view. Also have a small
+       method to do the layout of the group header. Don't use a separate
+       method to do the groups calculation in Icons view, since our methods
+       are now a little simpler.
+       * ListViewGroup.cs: Use the more accurate `HeaderBounds' name than
+       `Bounds'.
+       * ThemeWin32Classic.cs: Likewise.
+
+2007-08-16  Jonathan Pobst  <monkey@jpobst.com>
+
+       * Application.cs: Add FilterMessage method and rework our message loop
+       logic to use it.
+
+2007-08-16  Jonathan Pobst  <monkey@jpobst.com>
+
+       * Application.cs: Add some methods and stub a few methods that are
+       pretty much never used.
+
+2007-08-15  Jonathan Pobst  <monkey@jpobst.com>
+
+       * TreeNode.cs: Add some serialization methods.
+
+2007-08-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * ListView.cs: In ListViewItemCollection have a 
+       'is_main_collection' field to not modify ListViewItem.ListView
+       when using it as ListViewGroup.Items (and not ListView.Items)
+       and also don't modify selection state (.Net behaviour). 
+       Instead, set group for items contained in a ListViewGroup.Items collection.
+       * ListViewItem.cs: Simplify some code in Group setter.
+       * ListViewGroup.cs: use the new .ctor to pass the current instance
+       to the ItemsCollection.
+       * ListViewGroup.cs: Set the ListView property for ListViewGroup
+       instances when adding/removing. Also make Remove use RemoveAt, which
+       should perform better.
+
+2007-08-14  Jonathan Pobst  <monkey@jpobst.com>
+
+       * Message.cs, TabControl.cs, TextBox.cs, TextBoxBase.cs: Hide some 2.0 API
+       that crept into the 1.1 profile.
+
 2007-08-14  Jonathan Pobst  <monkey@jpobst.com>
 
        * ToolBarButton.cs: Implement ImageKey.