2006-05-31 Chris Toshok <toshok@ximian.com>
authorChris Toshok <toshok@novell.com>
Wed, 31 May 2006 19:30:58 +0000 (19:30 -0000)
committerChris Toshok <toshok@novell.com>
Wed, 31 May 2006 19:30:58 +0000 (19:30 -0000)
commitee21e7189d1e012df018ee109cd31635c9293498
treece950ba8ba43ec1fc8f2cfc5c2808ceb6105a88b
parent4453e46a6641ddf51c303fe5e85ffe1b24210655
2006-05-31  Chris Toshok  <toshok@ximian.com>

* DataGridDrawingLogic.cs (FromPixelToColumn): modify this to also
return (via an out parameter) the starting X of the column.
(UpdateVisibleColumn): track change to FromPixelToColumn.
(HitTest): add a ColumnResize case here.
(DrawResizeLine): new function, probably poorly named.

* DataGrid.cs (.ctor): get rid of cached_currencymgr_events.  We
only need to keep one reference.
(set_ListManager): same.
(OnMouseDown): call HitTest instead of grid_drawing.HitTest.
Also, add support for HitTestType.ColumnResize.
(OnMouseMove): add column resize behavior here, and change the
cursor to the correct one as we move around the datagrid.
(OnMouseUp): terminate the column resize if we're resizing.
(ProcessGridKey): from the MS docs, Alt-0 enters the null value
for the current cell.
(ConnectListManagerEvents): use cached_currencymgr.
(DisconnectListManagerEvents): fill this in, using
cached_currencymgr.
(SetCurrentCell): remove cached_currencymgr_events handling.
(SetDataMember): only call DisconnectListManagerEvents if
cached_currencymgr is != null.
(SetDataSource): same.
(OnListManagerCurrentChanged): cached_currencymgr_events ->
cached_currencymgr.

svn path=/trunk/mcs/; revision=61350
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGrid.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridDrawingLogic.cs