Commit Graph
168 Commits
Author SHA1 Message Date
Jackson Harper 95c4c50b46 * TreeView.cs: Set the first node to the selected node when we
* get
        focus if there is no selected node.


svn path=/trunk/mcs/; revision=76213
2007-04-24 19:16:22 +00:00
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 e04c61384f * TreeView.cs: Dont try to unhighlight the selected node if
* there
        isn't a selected node.


svn path=/trunk/mcs/; revision=76037
2007-04-21 05:35:16 +00:00
Jackson Harper 5ac7b5789b * UpDownBase.cs:
* TextBoxBase.cs:
        * ListView.cs:
        * ListBox.cs:
        * TreeView.cs: Use the InternalBorderStyle property to set the
        initial border style, this forces the client rectangle to be
sized
        correctly.


svn path=/trunk/mcs/; revision=76034
2007-04-21 05:17:20 +00:00
Jackson Harper ef09f63a08 * TreeView.cs: Simplify scrolling to the last node after
* expanding
        all.
        - Fix some off by ones with setting the bottom.


svn path=/trunk/mcs/; revision=76029
2007-04-20 22:32:23 +00:00
Jackson Harper a94692ae3f * TreeView.cs: Don't offset the images, this was causing some
artifacts when expanding/collapsing with images that were the
        exact height of the treenode.


svn path=/trunk/mcs/; revision=74695
2007-03-20 15:46:06 +00:00
Jackson Harper 2e0cecaceb * TreeView.cs: ScrollWindow works properly now, so we don't need
to screw around with the scroll area.  This fixes some artifacts
        when expanding and collapsing.


svn path=/trunk/mcs/; revision=74576
2007-03-18 23:29:04 +00:00
Jackson Harper 811df8981a * TreeView.cs: Some workarounds so that we can match event order
* a
        little better.


svn path=/trunk/mcs/; revision=74295
2007-03-14 19:38:41 +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
George Giolfan e9c0b428a9 2007-03-12 George Giolfan <[email protected]>
* TreeView.cs: Make it compile.

svn path=/trunk/mcs/; revision=74153
2007-03-12 23:00:20 +00:00
Jackson Harper 2d38cfe70f - oops made scrolling backwards.
svn path=/trunk/mcs/; revision=74150
2007-03-12 22:09:39 +00:00
Jackson Harper eb6a366fd1 * TreeView.cs: Basically emulating some strangness here with
exanding nodes and setting node positions when windows aren't
        created.
        - Also attempting to walk the node tree less than previously,
          and
        just use visible order calculations for determining offsets.


svn path=/trunk/mcs/; revision=74146
2007-03-12 21:21:44 +00:00
Jackson Harper 18309f0c33 * TreeView.cs:
* TreeNode.cs:
        * OpenTreeNodeEnumerator: Match MS better for IsVisible and
        IsExpanded.


svn path=/trunk/mcs/; revision=74099
2007-03-12 07:37:49 +00:00
Jackson Harper 578bdcc9ee * TreeView.cs: Show the correct image for selected node (this
* used
        to work, not sure how the code got deleted). Also implemented
2.0 feature
        SelectedImageKey.


svn path=/trunk/mcs/; revision=73969
2007-03-08 20:49:52 +00:00
Jackson Harper b310c43e19 * TreeView.cs: Implement owner draw tree nodes. And a couple
* more
        2.0 properties
        * DrawTreeNodeEventHandler.cs: Add
        * DrawTreeNodeEventArgs.cs: Correct default value.


svn path=/trunk/mcs/; revision=73912
2007-03-07 21:58:21 +00:00
Jackson Harper 8a2c6eee69 - Implement 2.0 image key feature.
svn path=/trunk/mcs/; revision=73847
2007-03-06 21:32:20 +00:00
Jackson Harper b2faa27176 - Implement 2.0 LineColors property. Lets you change the color
of
        the lines in the tree. Terribly useful for creating non cohesive
        desktops.


svn path=/trunk/mcs/; revision=73835
2007-03-06 19:27:47 +00:00
Jackson Harper 198c7f34f1 - Implement 2.0 Sort method.
svn path=/trunk/mcs/; revision=73832
2007-03-06 18:01:59 +00:00
Jackson Harper e0de34762a * TreeView.cs: Implement 2.0 TopNode setter property.
- Use a local var instead of the skipped_nodes field for
          computing
        how many nodes to skip.  Otherwise we won't scroll because the
        valuechanged handler checks if skipped_nodes is equal to the new
        value.        


svn path=/trunk/mcs/; revision=73830
2007-03-06 17:52:37 +00:00
Jackson Harper fba72f6bb8 * TreeView.cs: We can't get the bounds of the nodes before
* raising
        the AfterSelect event, because that event could change the
node's
        bounds (scrolling, font change, etc).


svn path=/trunk/mcs/; revision=73824
2007-03-06 16:55:48 +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
Jackson Harper 043cf64367 * TreeView.cs: We need to check scrollbar visibility when window
visibility is updated, because non visible trees don't ever add
        scrollbars.


svn path=/trunk/mcs/; revision=72312
2007-02-05 17:42:22 +00:00
Jackson Harper 61758da3d7 * TreeView.cs: Make sure we factor in the vert scrollbar when
calculating the horizontal scrollbar's maximum.


svn path=/trunk/mcs/; revision=69797
2006-12-20 03:19:22 +00:00
Chris Toshok d0649eafce revert r69151
svn path=/trunk/mcs/; revision=69498
2006-12-14 18:44:35 +00:00
Chris Toshok 3129467691 * ToolTip.cs: use Visible instead of is_visible.
* TreeView.cs: same.

	* ListBox.cs: same.

	* ListView.cs: same.

2006-12-06  Chris Toshok  <[email protected]>


svn path=/trunk/mcs/; revision=69151
2006-12-07 03:14:14 +00:00
Chris Toshok 1da3fa560f 2006-12-04 Chris Toshok <[email protected]>
* LinkLabel.cs: fix up compiler warnings.

	* TableLayoutSettings.cs: same.

	* TreeView.cs: same.

	* ToolBar.cs: same.

	* TabControl.cs: same.

	* RichTextBox.cs: same.

	* ListViewItem.cs: same.

	* PropertyGrid.cs: same.

	* DataGridViewRowPostPaintEventArgs.cs: corcompare fix.

	* ToolTip.cs same.

	* TextRenderer.cs: fix up compiler warnings.

	* Label.cs: same.

	* Form.cs: corcompare fixes.

	* PictureBox.cs: fix up compiler warnings.

	* ImageListStreamer.cs: same.

	* TrackBar.cs: corcompare fix.

	* Control.cs: fix up compiler warnings.

	* SplitterPanel.cs: same.

	* NumericTextBox.cs: same.

	* ImageList.cs: same.

	* StatusStrip.cs: same.

	* ProgressBar.cs: corcompare fix.

	* ToolStripButton.cs: fix up compiler warnings.

	* ToolStripStatusLabel.cs: same.

	* ToolStripSplitButton.cs: same.

	* ToolStripSeparator.cs: same.

	* ToolStripProgressBar.cs: same.

	* ToolStripDropDownMenu.cs: same

	* ToolStripDropDown.cs: same.

	* ToolStripDropDownButton.cs: same.

	* ToolStrip.cs: same.

	* ToolStripControlHost.cs: same.

	* ToolStripContentPanel.cs: same.

	* ToolStripDropDown.cs: same.

	* ToolStripContainer.cs: same.

	* ToolStripPanel.cs: same, and add "new" where we need it to work
	with the new ArrangedElementCollection.

	* ToolStripItemCollection.cs: add "new" where we need it to work
	with the new ArrangedElementCollection.


svn path=/trunk/mcs/; revision=69012
2006-12-05 04:11:38 +00:00
Chris Toshok 61373aeda6 In System.Windows.Forms:
[ fix the majority of the CS0108 warnings we've been suppressing ]
	
	* TreeView.cs: mark BackgroundImageChanged as 'new'.

	* ToolBar.cs: ImeMode just passes stuff to Control.  Rename Layout
	to "LayoutToolBar" to quiet mcs.
	
	* TabControl.cs: mark our ControlCollection class as 'new'.

	* TextBoxBase.cs: mark some events as 'new'.

	* Splitter.cs: TabStop is 'new'.

	* ControlBindingsCollection.cs: mark a few methods as new since
	they change the visibility from protected to public.

	* RadioButton.cs: DoubleClick -> base class, and remove unused
	HaveDoubleClick.

	* MonthCalendar.cs: ImeMode property -> base class, and mark many
	events as new.

	* NumericUpDown.cs: TextChanged -> base class.

	* CheckedListBox.cs: mark our ObjectCollection class as new to
	quiet mcs.

	* FolderBrowserDialog.cs: make HelpRequest event new and have it
	muck with the base class.

	* StatusBar.cs: fix some mcs warnings about Update being the same
	name as a base class method.

	* RichTextBox.cs: mark some events as new, and make them do things
	to the base class impl.

	* UserControl.cs: mark TextChanged as new, and have it manipulate
	base.TextChanged.

	* UpDownBase.cs: mark some things new.

	* CheckBox.cs: mark DoubleClick "new", and add some text about
	what we need to look at.

	* Panel.cs: make the events "new", and manipulate the base
	version.  these are just here for attributes.

	* AccessibleObject.cs: make owner private.

	* Control.cs: deal with AccessibleObject.owner being private.
	cache our own copy if we need it.

	* Button.cs: add "new" to the DoubleClickEvent.

	* ListBox.cs: no need to track our own has_focus here.  let
	Control.has_focus do it for us.  Also some other work to clear up
	warnings about not overriding base class methods of the same name.
	
	* ComboBox.cs: clear up some warnings about not override base
	class methods of the same name.

2006-12-01  Chris Toshok  <[email protected]>

In System.Windows.Forms.X11Internal:
2006-12-01  Chris Toshok  <[email protected]>

	* X11Hwnd.cs: need to mark queue as "new" to quiet mcs.


svn path=/trunk/mcs/; revision=68852
2006-12-01 21:30:55 +00:00
Chris Toshok 635ab49c74 * TreeView.cs: doh, the Begin* events should be
TreeViewCancelEventHandler.

2006-12-01  Chris Toshok  <[email protected]>


svn path=/trunk/mcs/; revision=68810
2006-12-01 06:31:01 +00:00
Chris Toshok c9fd27d1ce 2006-12-01 Chris Toshok <[email protected]>
* Button.cs, PropertyGridTextBox.cs, ComboBox.cs,
	SplitContainer.cs, Control.cs, StatusStrip.cs,
	DataGridTableStyle.cs, MenuItem.cs, DomainUpDown.cs, ImageList.cs,
	NumericTextBox.cs, NumericUpDown.cs, Panel.cs, CommonDialog.cs,
	DataGrid.cs, ScrollBar.cs, TrackBar.cs, PictureBox.cs,
	DateTimePicker.cs, StatusBar.cs, Form.cs, PrintPreviewDialog.cs,
	Label.cs, UserControl.cs, CheckBox.cs, RadioButton.cs,
	LinkLabel.cs, ListControl.cs, PropertyGrid.cs, Splitter.cs,
	MenuStrip.cs, FolderBrowserDialog.cs, NotifyIcon.cs,
	TextBoxBase.cs, ListView.cs, DataGridBoolColumn.cs,
	PrintPreviewControl.cs, RichTextBox.cs, ListBox.cs, TabControl.cs,
	DataGridColumnStyle.cs, ContextMenu.cs, TreeView.cs:

	do most of the work to convert our code over to use
	System.ComponentModel.Component.Events for
	adding/removing/dispatching events.



svn path=/trunk/mcs/; revision=68807
2006-12-01 06:16:09 +00:00
Gert Driesen 999a455add * ControlStylesTest.cs: Fixed GetStyle for 2.0 profile.
* ProgressBar.cs: GetStyle fixes for 2.0 profile.
* Control.cs: Same.
* UpDownBase.cs: Same.
* ButtonBase.cs: Same.
* ScrollBar.cs: Same.
* TrackBar.cs: Same.
* PictureBox.cs: Same.
* UserControl.cs: Same.
* Label.cs: Same.
* ListControl.cs: Same.
* TextBoxBase.cs: Same.
* ListView.cs: Same.
* RichTextBox.cs: Same.
* TreeView.cs: Same.

svn path=/trunk/mcs/; revision=68480
2006-11-26 16:55:15 +00:00
Jackson Harper fbbac4e7e6 * TreeView.cs: Allow more explicit setting of top node
* position
        for scrollbars. Slower algo, but more accurate.
        - CollapseAll should maintain the current top node.


svn path=/trunk/mcs/; revision=68018
2006-11-16 18:03:20 +00:00
Jackson Harper 8bd63c23aa * TreeView.cs: Need to recalc the topnode when we expand or
collapse. The scrolling methods can't handle this on their own,
        since they use differences between the last scroll position, and
        those difference get completely messed up since we are expanding
        nodes.  This problem should probably be fixed in the scrolling
        methods, so they can figure out exactly where they are, but this
        will slow things down a little.


svn path=/trunk/mcs/; revision=68002
2006-11-16 15:31:45 +00:00
Alexander Olk c86a6c0789 2006-11-14 Alexander Olk <[email protected]>
* TreeView.cs: De-uglify TreeView checkbox checkmarks.
	  (Fixes bug #79927)


svn path=/trunk/mcs/; revision=67865
2006-11-14 18:09:16 +00:00
Jackson Harper 09f452f052 * TreeView.cs: ActualItemHeight factors in the image height
- compute left edge of checkboxes correctly
        - when expanding/collapsing move the bottom down one pixel, so
          we
        aren't moving part of the node


svn path=/trunk/mcs/; revision=67783
2006-11-13 19:53:20 +00:00
Jackson Harper 33b0ca05f0 * TreeView.cs: Use the currently highlighted node for the
BeforeSelect event.


svn path=/trunk/mcs/; revision=67673
2006-11-10 15:48:54 +00:00
Jackson Harper ecd9dec7a2 * TreeView.cs: Can't use the VisibleCount property when setting
scrollbar heights, because this doesn't take into account
whether
        or not the horz scrollbar just came visible.


svn path=/trunk/mcs/; revision=67412
2006-11-06 19:08:07 +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
Mike Kestner d214aee679 2006-09-21 Mike Kestner <[email protected]>
* TreeView.cs: guard against disposed conditions in UpdateScrollbars
	to deal with people updating the TreeNodeCollection after the tree
	is disposed.  "Fixes" 79330.

svn path=/trunk/mcs/; revision=65771
2006-09-21 16:23:51 +00:00
Jackson Harper 724ac7780c * TreeView.cs: Bounding box for the mouse movement reverting
focus/selection back to previously selected node.  This matches
        MS, and makes the tree a lot more useable.


svn path=/trunk/mcs/; revision=64723
2006-09-01 16:44:55 +00:00
Jackson Harper 0ced2df1c6 - Need to focus on rbutton mouse down. And redraw selection when
right click is mouse upped.


svn path=/trunk/mcs/; revision=64518
2006-08-29 18:52:02 +00:00
Jackson Harper 6fc6e209ab * TreeView.cs: Need to track selected node and highlighted node,
they aren't always the same thing, when the mouse is down on a
        node it is hilighted, but not selected yet.
        - Do the HideSelection stuff right        


svn path=/trunk/mcs/; revision=64516
2006-08-29 18:28:09 +00:00
Jackson Harper 5fae23eba5 - Use the original clip rectangle for checking if the area
between
        the two scrollbars is visible, not the viewport adjusted
clipping
        rectangle.


svn path=/trunk/mcs/; revision=64209
2006-08-22 20:14:00 +00:00
Jackson Harper 0269ca1991 * TreeView.cs: Make sure both scrollbars get displayed and sized
correctly when the other bar is visible.


svn path=/trunk/mcs/; revision=64208
2006-08-22 20:01:58 +00:00
Jackson Harper 67df2f8f16 * TreeView.cs: Specify treeview actions (old patch that didn't
* get
        committed for some reason).
        - Don't let the mouse wheel scroll us too far.  Just want to
          make
        the bottom node visible, not scroll it all the ways to the top.


svn path=/trunk/mcs/; revision=63935
2006-08-17 18:23:11 +00:00
Jackson Harper e64c5c19c9 * TreeView.cs: Make sure the visible order is computed when we
attempt to size the scrollbars (for trees that mess with the
        scrolling when they shouldn't.
        - Make sure to give the scrollbars valid values.


svn path=/trunk/mcs/; revision=63064
2006-07-27 21:19:27 +00:00
Jackson Harper db203345fe - Use the client rectangle when setting the trees scrollbars, so
border style is taken into account.


svn path=/trunk/mcs/; revision=62649
2006-07-15 22:23:39 +00:00
Jackson Harper abf821eb88 * LabelEditTextBox.cs:
* TreeView.cs: Use a new LabelEdit class for node editing, this
        class automatically 'closes' itself when it gets the enter key
or
        loses focus.    


svn path=/trunk/mcs/; revision=62645
2006-07-15 20:01:22 +00:00
Jackson Harper cc2d5ecd5b * TreeNode.cs:
* TreeView.cs: Make the editing work similar to MSs, firing the
        events correctly and ending edits correctly.


svn path=/trunk/mcs/; revision=62630
2006-07-15 04:52:36 +00:00
Jackson Harper 995016d8a2 * TreeView.cs: Raise the OnAfterLabelEdit event correctly.
* Also,
        when the tree is scrolled we end editing.        


svn path=/trunk/mcs/; revision=62613
2006-07-14 18:13:33 +00:00