Commit Graph
43 Commits
Author SHA1 Message Date
Jackson Harper 7aae568a02 * TreeView.cs: Do not create the treeview's handle when setting
the scroll position.
        - ExpandAll needs to compute the scrollbars so it knows which
        position to set the bar too.
        * TreeNode.cs: 
        * TreeNodeCollection.cs: Pass new flag to UpdateScrollBars


svn path=/trunk/mcs/; revision=76152
2007-04-23 21:00:20 +00:00
Jackson Harper 017ce5c00e need to use the property.
svn path=/trunk/mcs/; revision=74302
2007-03-14 20:41:57 +00:00
George Giolfan c55e4bec95 2007-03-14 George Giolfan <[email protected]>
* TreeView.cs: Add TreeViewNodeSorter.
	* TreeNodeCollection.cs: Add sorter parameter to Sort method.
	* TreeViewTest.cs: Add TreeViewNodeSorterTest.

svn path=/trunk/mcs/; revision=74266
2007-03-14 16:34:25 +00:00
Jackson Harper 4c75230ab9 * TreeView.cs: Calculate the top node 'on the fly', this
eliminates issues where you need to click on the tree before
        scrolling it to get the top node computed correctly.
        * TreeNodeCollection.cs: We don't need to mess with the top node
        anymore.


svn path=/trunk/mcs/; revision=73333
2007-02-22 19:53:42 +00:00
Andreia Gaita 34ef8c5e22 * TreeNode.cs: Add new 2.0 ImageKey and SelectedImageKey properties.
* TreeNodeCollection.cs: New Add() methods, ContainsKey and
IndexOfKey() for 2.0

Tests:

* BindingTest.cs (BindingContextChangedTest2): Added 2.0-specific check,
was failing under ms.net.

* ComboBoxText.cs (FindStringExactMatchException): Add check for exception 
only for 1.1 - was failing under ms.net

* ControlTest.cs: 
  - AnchorDockTest: Fix incorrect assertion #5 - was failing 
  under ms.net
  - TestForm: Fix incorrect assertion #4 - was failing 
  under ms.net
* TreeNodeCollectionTest.cs: Add new tests for 2.0	

2007-01-23  Andreia Gaita  <[email protected]>

svn path=/trunk/mcs/; revision=71515
2007-01-23 15:24:09 +00:00
Gert Driesen eff4086e61 * ControlEventTest.cs: Added tests for Invalidated event.
* TreeNodeCollectionTest.cs: Added IList indexer tests.
* TreeNodeCollection.cs: Avoid duplicating indexer code.

svn path=/trunk/mcs/; revision=67755
2006-11-13 14:11:38 +00:00
Jackson Harper 887b7c2ec5 * TreeNodeCollection.cs: Update scrollbars after clearing.
svn path=/trunk/mcs/; revision=67427
2006-11-07 01:58:46 +00:00
Gert Driesen 5eac18e532 * TreeNodeCollection.cs: To match MS, in 1.0 profile throw
NullReferenceException when attempting to remove node that is not in
collection. Throw NullReferenceException when null is passed to
Remove. Allow first element of the collection to be removed. Fixes
bug #79831.  In GetEnumerator ().Current return null if positioned
before the first element of the collection. In GetEnumerator ().Reset,
position before first element of the collection.
* TreeNodeCollectionTest.cs: Added tests for TreeNodeCollection.
* System.Windows.Forms_test.dll.sources: Added TreeNodeCollectionTest.cs.

svn path=/trunk/mcs/; revision=67376
2006-11-05 14:09:18 +00:00
Jackson Harper 79a5736e11 * TreeView.cs: Don't update scrollbars when we aren't visible.
* TreeNodeCollection.cs: Only need to update scrollbars if being
        added to an expanded visible node or the root node.


svn path=/trunk/mcs/; revision=66493
2006-10-10 02:53:04 +00:00
Jackson Harper 526c1deb09 * TreeNodeCollection.cs: Don't do a recalculate/updatescrollbars
here, since it will get called for every node collection in the
        tree. This is now done in the treeview once the sorting is
        finished.
        * TreeView.cs: Recalculate the visible order, and update the
        scrollbars after sorting, set the top nope to the root so that
the
        recalc actually works.


svn path=/trunk/mcs/; revision=66091
2006-09-29 17:21:15 +00:00
Jackson Harper 4f58f2d107 * TreeNodeCollection.cs: Fix copyto to use the correct nodes
length. (We have a larger array then actual node count).


svn path=/trunk/mcs/; revision=63319
2006-08-03 18:20:10 +00:00
Jackson Harper 3aa1ce61d6 * TreeNodeCollection.cs: Fix the clear method.
- Fix the Shrink also


svn path=/trunk/mcs/; revision=63125
2006-07-28 22:13:44 +00:00
Jackson Harper 5d2a8bbcf1 * TreeNodeCollection.cs: Fix the clear method.
svn path=/trunk/mcs/; revision=63122
2006-07-28 21:42:38 +00:00
Jackson Harper 49d30fcf12 TreeNode.cs: Make is_expanded internal so the treenode
collection can change it without firing the whole event chain.
        * TreeNodeCollection.cs: When clearing all the child nodes make
        sure to recalc the visible order.
        - Improve algo for remove the top node


svn path=/trunk/mcs/; revision=61387
2006-06-01 20:53:10 +00:00
Jackson Harper 4453e46a66 * BindingManagerBase.cs: Remove somedebug code that creeped into
SVN.
        * TreeNode.cs: We get the indent level dynamically right now, so
        don't track it as a member.
        * TreeNodeCollection.cs: Make sure all nodes added to the list
        have parents, treeviews/topnodes setup properly.
        - Don't attempt to track indent level.


svn path=/trunk/mcs/; revision=61349
2006-05-31 19:19:20 +00:00
Jackson Harper 2c3a34970e * TreeNodeCollection.cs: If the tree doesn't have a top node
* when
        a new node is inserted make the new node the top.


svn path=/trunk/mcs/; revision=61174
2006-05-26 19:51:03 +00:00
Jackson Harper 53db40a783 * TreeNodeCollection.cs: Dont't recalculate the visible order on
inserted nodes that aren't visible.  This changes the
        max_visible_order which confuses scrollbar settings.
        - Use the enumerator to get the prev node instead of duplicating
        code.
        * TreeView.cs: Use new method for setting scrollbar values
        - Don't set the bounds every time the scrollbar is updated
        - When updating below the root node use an invalidate instead of
          a
        refresh to prevent the child controls (scrollbars) from being
        refreshed. (UpdateBelow still needs to be reworked anyways).


svn path=/trunk/mcs/; revision=61085
2006-05-24 21:04:12 +00:00
Jackson Harper bc915ff706 * TreeNode.cs: Bounds are computed 'on the fly' now. This
* allows
        treenode calculations to be independant of the painting code. To
        do this nodes track a visible order which is calculated by the
        treeview.
        - Call new methods for expanding/collapsing nodes.  These
          methods
        use scrollwindow so we don't have to update everything below the
        node.
        * TreeView.cs: Refactored drawing and scrolling code.  We don't
        need to update nodes when drawing anymore or calculate scrollbar
        stuff.
        - Added new methods for expanding/collapsing nodes. These
          methods
        use ScrollWindow so as to not have to redraw all the nodes
below.
        * TreeNodeCollection.cs: Recalc visible order and scrollbars
        * when
        we add/remove nodes or sort.
        - Handle removing the selected and the top node properly.


svn path=/trunk/mcs/; revision=61021
2006-05-23 22:21:17 +00:00
Mike Kestner 2b31e27b21 boatload of corcompare virtual cleanup
svn path=/trunk/mcs/; revision=58683
2006-03-28 23:09:16 +00:00
Jackson Harper ab8c96da7e * TreeNodeCollection.cs: If we are clearing the root node we
* need
        to reset top_node so calcs can still happen.


svn path=/trunk/mcs/; revision=58279
2006-03-22 04:22:08 +00:00
Jackson Harper a9a07cb963 * X11Dnd.cs: Make sure to add all the text formats when adding
strings to the data object.
        * TreeNodeCollection.cs: When adding to a sorted tree we need to
        do some redrawing too.  Also change the UpdateNode to an
        UpdateBelow so the newly added node gets painted.


svn path=/trunk/mcs/; revision=55410
2006-01-12 02:54:08 +00:00
Jackson Harper e44bb3ca26 * TreeNodeCollection.cs: Some fixes to prevent null refs. Patch by
Dieter Bremes.


svn path=/trunk/mcs/; revision=54550
2005-12-16 22:24:37 +00:00
Jackson Harper 5d3b43faaa * TreeView.cs: Make top_node internal so the TreeNodeCollections
can play with it.
	* TreeNodeCollection.cs: If we remove the topnode we need to
	update topnode to the next node in line.
	- When clearing nodes go through the same process as removing
	them, so they get depareneted and checked if they are top
	node.


svn path=/trunk/mcs/; revision=53829
2005-12-02 09:16:40 +00:00
Jackson Harper 704b94875e * TreeView.cs: When imagelists are used the image area is
selectable as well as the text.
	- If there are no selected nodes select the first one.
	* TreeNodeCollection.cs: Getting the TreeView is mildly expensive,
	so don't do it more then we need to.


svn path=/trunk/mcs/; revision=53827
2005-12-02 08:28:33 +00:00
Jackson Harper 308f4c270b * TreeNodeCollection.cs: Refresh when nodes are cleared from the
collection.


svn path=/trunk/mcs/; revision=52598
2005-11-04 22:01:29 +00:00
Jackson Harper f0f46d9863 * TreeNodeCollection.cs: Remove should not be virtual.
svn path=/trunk/mcs/; revision=52543
2005-11-03 23:17:52 +00:00
Jackson Harper a5e912d09e opps debug code.
svn path=/trunk/mcs/; revision=52542
2005-11-03 23:14:32 +00:00
Jackson Harper d46aedeb9c * TreeNode.cs: Don't cache the tree_view or index anymore, now
that nodes can be moved from tree to tree easily this just causes
	all sorts of problems.
	* TreeNodeCollection: Don't need to give treenodes an index and
	treeview anymore when they are added, these are computed on the
	fly. Also make sure to remove a node before its added.


svn path=/trunk/mcs/; revision=52522
2005-11-03 20:03:37 +00:00
Jackson Harper ee9ff69666 * TreeNodeCollection.cs: When adding to an empty node we need to
invalidate its plus minus area so the little block shows up.


svn path=/trunk/mcs/; revision=52058
2005-10-21 22:40:55 +00:00
Jackson Harper 2cae6511a1 * TreeNodeCollection.cs: Remove debug code.
svn path=/trunk/mcs/; revision=52006
2005-10-20 21:23:35 +00:00
Jackson Harper 0a4b1a8b10 * TreeNodeCollection.cs: Remove items properly. Update the correct
area after removing them.


svn path=/trunk/mcs/; revision=51976
2005-10-20 10:42:31 +00:00
Jackson Harper 869c528ce4 * TreeView.cs: Implement Begin/EndEdit more correctly so refreshes
are reduced when adding nodes.
	* TreeNode.cs:
	* TreeNodeCollection.cs: Use UpdateNode instead of refreshing the
	tree.


svn path=/trunk/mcs/; revision=51959
2005-10-20 02:43:21 +00:00
Jackson Harper 180617da12 * TreeView.cs: We don't need to keep a count anymore.
* TreeNodeCollection.cs: Fix off by one in RemoveAt, Insert can
	use the Grow method.


svn path=/trunk/mcs/; revision=51898
2005-10-19 03:46:28 +00:00
Jackson Harper 3cb82308b5 * TreeNodeCollection.cs: Insert is not supported on arrays, so
implement it manually here.


svn path=/trunk/mcs/; revision=51897
2005-10-19 03:03:04 +00:00
Jackson Harper 3b6582ba41 * TreeView.cs: If updating the root node do a full refresh.
* TreeNode.cs: The root node should be expanded by default. Also
	added a utility prop to tell if we are the root node.
	* TreeNodeCollection.cs: Only refresh if the node we are being
	added to is expanded. Also added a comment on a potential
	optimization.


svn path=/trunk/mcs/; revision=51231
2005-10-05 08:42:55 +00:00
Jordi Mas i Hernandez a696443950 2005-05-17 Jordi Mas i Hernandez <[email protected]>
* TreeNodeCollection.cs: fixes get/set item ranges
	

svn path=/trunk/mcs/; revision=44610
2005-05-17 09:17:33 +00:00
Peter Dennis Bartok 37becc5332 2005-02-17 Peter Bartok <[email protected]>
* Application.cs: Now calls registered message filters
        * DockStyle.cs: Fixed attribute
        * Form.cs: Fixed attribute
        * Menu.cs: Fixed attribute
        * ToolTip.cs: Fixed attribute
        * TreeNode.cs: Added missing attributes and arranged in regions
        * PropertyGrid.cs: Fixed signatures
        * TreeNodeCollection.cs: Added attributes
        * Splitter.cs: Added missing attributes; arranged into regions
        * TabPage.cs: Added missing attributes; arranged into regions
        * TextBoxBase.cs: Added missing attributes
        * TextBox.cs: Added missing attributes
        * ArrangeDirection.cs: Added missing attributes
        * TreeNodeConverter.cs: Added stub (needed for TreeNode)
        * ToolBarButton.cs: Fixed attributes
        * AnchorStyles.cs: Fixed attribute
        * TrackBar.cs: Fixed attributes
        * TabControl.cs: Added missing attributes and arranged into regions
        * ToolBar.cs: Fixed attribute
        * StatusBar.cs: Fixed signature, organized into regions and added
          attributes
        * StatusBarPanel.cs: Fixed attributes
        * ContentsResizedEventArgs.cs: Implemented
        * ContentsResizedEventHandler.cs: Implemented
        * DateBoldEventArgs.cs: Implemented
        * DateBoldEventHandler.cs: Implemented
        * UpDownEventArgs.cs: Implemented
        * UpDownEventHandler.cs: Implemented


svn path=/trunk/mcs/; revision=40801
2005-02-17 11:12:28 +00:00
Jackson Harper 30cdaf4c14 * TreeView.cs: Refresh the tree after sorting the nodes. Always
draw the connecting node lines (when ShowLines is true).
	* TreeNode.cs: The nodes index can now be updated. This is used
	when a node collection is sorted.
	* TreeNodeCollection.cs: Implement sorting. Nodes can be sorted on
	insert or an existing unsorted node collection can be sorted.


svn path=/trunk/mcs/; revision=38837
2005-01-12 23:49:09 +00:00
Jackson Harper 40e9d4030d * TreeNodeCollection.cs: Refresh the tree when a new node is added.
svn path=/trunk/mcs/; revision=38636
2005-01-10 18:41:31 +00:00
Marek Safar 907a18f667 2004-12-03 Marek Safar <[email protected]>
* OwnerDrawPropertyBag.cs: New internal parameterless ctor.

	* TreeNode.cs: Implemented ICloneable, Fixed to pass my simple
	tests.
	
	* TreeNodeCollection.cs: Add exception throwing for Add,AddRange.
	
	* TreeView.cs: BackColor is Colors.Window.

svn path=/trunk/mcs/; revision=36999
2004-12-03 09:55:02 +00:00
Jackson Harper 322faf65e9 Initial Implementation
svn path=/trunk/mcs/; revision=36922
2004-12-02 07:32:11 +00:00
Peter Dennis Bartok 2983d68386 - Removed TreeView additions.
I am removing these files as they conflict with already completed 
  work. While it is fantastic to get contributions to MWF, I 
  respectfully ask that everyone please coordinate their contributions 
  through mono-winforms-list or #mono-winforms at this time. We're 
  explicitly avoiding stubbing and don't want controls that don't have 
  their basic functionality implemented in svn. Please also see 
  http://www.mono-project.com/contributing/winforms.html



svn path=/trunk/mcs/; revision=36822
2004-11-30 07:23:03 +00:00
Marek Safar aa000d60d4 2004-11-29 Marek Safar <[email protected]>
* System.Windows.Forms.dll.sources: Added
	TreeNode.cs, TreeNodeCollection.cs, TreeView.cs,
	TreeViewAction.cs, TreeViewEventArgs.cs

	* System.Windows.Forms_test.dll.sources: Added
	TreeNodeTest.cs

svn path=/trunk/mcs/; revision=36785
2004-11-29 17:16:26 +00:00