 |
|
 |
I want to print items that are checked (check box) , how do I do that?
Alexander
|
|
|
|
 |
|
|
 |
|
 |
Hi, Mikael! How to know what items are checked??
Thanks
Alexander
|
|
|
|
 |
|
 |
Hi ,Mikael! Can you email me the latest update of the control?
My email: alpikus@gmail.com
Thanks
Alexander
|
|
|
|
 |
|
|
 |
|
 |
Hi, how can I access the collection of selected and checked items. I use this control for File Explorer purposes. So I heed to get each selected or checked item. I see the information inside the mwTreeView.SelNodes object, but how to access the paths?
Thank you
Alexander
|
|
|
|
 |
|
 |
when property "Full Row Select" in "On", select multiple TreeItems, then Mouse Click with Control Key Down does not unselect TreeItem.
|
|
|
|
 |
|
|
 |
|
 |
Good day.
I am developing an app using .Net 2.0 and have a multiselecttreeview. There is an issue when adding the first node to a parent node and setting the multiselecttreeview.SelectedNode to the NewNode does not work!!
I also noticed that if the parent's parent (grandparent) is expanded the first time, this results to the same affect! However, once I add NewNode to the parent and delete the child and add it again, the multiselecttreeview.SelectedNode can be set to the NewNode! Strange...
I've tested this out a few times and tried checking the NewNode.IsSlected property - if false, set the multiselecttreeview.SelectedNode to the NewNode but the following line does not work!!
multiselecttreeview.SelectedNode = NewNode;
I've been looking for any hints/code/suggestion that might help me in this weird/straing instance! After the first child is added everything is okay...! And there is something about the parent's parent Expand() method which might reflect this oddity!
Any help is appreciated...! Thank you in advance.
- Lorentz SoC
|
|
|
|
 |
|
 |
I am not quite understanding if you are using the MWTreeView or a multi-select TreeView of your own.
If it is one of your own the only hint I can give is to look at the MWTreeView where I override a lot of methods to take care of all the little things that happen. And remember, most things are overridden to make all this work.
Regards,
Mikael
|
|
|
|
 |
|
 |
Thank you for your post.
This is the class I am using.
public class MultiSelectTreeView : System.Windows.Forms.TreeView {
protected ArrayList selectedNodes ;
protected TreeNode lastNode, firstNode;
Boolean doubleClickActive = false;
Boolean supressExpandCollapse = false;
private Color readOnlyColor = Color.Blue;
private Color virtualColor = Color.DarkBlue;
public MultiSelectTreeView() { }
public ArrayList SelectedNodes { }
public Boolean SupressExpandCollapse { }
public Color ReadOnlyColor { }
public Color VirtualNodeColor { }
public Color GetNodeColor(bool readOnly, bool isVirtual) { }
protected override void DefWndProc(ref Message m) { }
protected override void OnBeforeExpand(TreeViewCancelEventArgs e) { }
protected override void OnBeforeCollapse(TreeViewCancelEventArgs e) { }
protected override void OnBeforeSelect(TreeViewCancelEventArgs e) { }
protected override void OnAfterSelect(TreeViewEventArgs e) { }
protected bool isParent(TreeNode parentNode, TreeNode childNode) { }
protected void removePaintFromNodes() { }
}
I left the code out just to show what methods/attributes i use. Again... if you can hint to anything that maybe causing this strange behavior I appreciate it. Thanks.
- Lorentz SoC
|
|
|
|
 |
|
 |
Sorry, like I said, the easiest way is for you to have a look at the methods in the MWTreeView, i.e. the overridden events. A single line of code in your overridden methods may be the cause, and without the code it is impossible for me to say.
All that is handled in a combination of a few of those - it is not enough just to do one if I remember correctly. There are a few events that work together and you have to catch the behavior in one/some of them and handle it in another/some others.
Regards,
Mikael
|
|
|
|
 |
|
 |
Helloooo all ,
I am working as a s/w trainee . I am new to C# . I want to move Multiple Controls at a time, at runtime . At a time i moved single Control at runtime but i failed to move multiple . so pls suggest how to move multiple Controls at runtime using RubberBand Rectangle .
Thanks,
ChandraLekha.
|
|
|
|
 |
|
 |
Hello,
setting the checked property doesn't affect the nodes in the TreeView (with CheckBoxes enabled).
Don't know if I have to set a different property or how to get this work.
foreach (MWCommon.MWTreeNodeWrapper nodeWrapper in this.treeViewParticipant.SelNodes.Values)
{
if (nodeWrapper.Node.Tag != null && nodeWrapper.Node.Tag is NodeInfoParticipant)
{
if (((ToolStripItem)sender).Name == "selectMarkedNodes")
nodeWrapper.Node.Checked = true; //The Checkbox of the node is not "checked" althoug set here
if (((ToolStripItem)sender).Name == "deSelectMarkedNodes")
nodeWrapper.Node.Checked = false;
}
}
Thanks
Georg
|
|
|
|
 |
|
 |
Don't quite remember how it works in that version of the MWTreeView, but there should be a CheckNode method.
|
|
|
|
 |
|
 |
Great control, Thank ..
I have a problem when I select the nodes, I copy the nodes and when I drag and drop them they aren´t in the selection order. some times it works some times dosn´t work,
Thank advanced
|
|
|
|
 |
|
 |
This is due to the fact that the TreeNodes are held internally in a hashtable.
If you change this you can choose whichever list-type you want and get the desired results.
|
|
|
|
 |
|
 |
on the regular tree, when the tree looses focus the highlighted node remains highlighted in light grey. However in this implementation there is no highlighting. Any chance of implementing it?
thanks for the hard work though, the tree is ace!
|
|
|
|
 |
|
 |
just realised there is a hideselection option that does exactly this! sorry!
I have modified your code and used this implementation of a tristate treeview:
http://www.codeproject.com/vb/net/vbnettristatechkbox.asp[^]
Perhaps you could include this in your next version? It seems to work quite well.
Thanks again
Kevin
|
|
|
|
 |
|
 |
Hi.
I have some problems with Before/After SelNodesChanged Event. I believe this event should be raised when the selection changes, but it doesn't.
I'm in need of event, which raises when user anyhow changes the selection of nodes (in multiselect), but SelNodesChanged raises under entirely different occasions, SelNodeChanged raises twenty times more often than is necessary (whenever mouse with left button clicked moves, even about one pixel) and AfterSelect doesn't work with multiselect.
Any suggestions please?
|
|
|
|
 |
|
 |
I'm encountering this bug as well.
|
|
|
|
 |
|
 |
Thanks for your control.
At runtime I'm trying to mark my node as being deleted before making changes.
I have to change the ImageIndex of the node to set appropriate icon indicating the node is being deleted. I set ImageIndex = 1 and SelectedImageIndex = 1, but as soon as the node loses focus ImageIndex returns back to 0 - default value for the tree.
So, how to set ImageIndex at runtime?
Thanks.
|
|
|
|
 |
|
 |
1. in MWTreeNodeWrapper::Deselect(MWTreeNodeWrapper mwtnw)
correct mwtnw.Node.SelectedImageIndex = mwtnw.SelectedImageIndex;
instead of mwtnw.Node.ImageIndex = mwtnw.ImageIndex;
2. Instead of working with SelectedImageIndex of MWTreeNodeWrapper object via iSelectedImageIndex - member of MWTreeNodeWrapper you should work with tnNode.SelectedImageIndex exported via property
and therefore iSelectedImageIndex should be replaced with tnNode.SelectedImageIndex.
Explanation: before one selects new node in tree the constructor of MWTreeNodeWrapper is called and iSelectedImageIndex is initialized with tnNode.SelectedImageIndex. But when I change ImageIndex and SelectedImageIndex at runtime (see post above) - iSelectedImageIndex doesn't change - from here all the problem arises described above.
|
|
|
|
 |
|
 |
In the version posted here I think there should be (static?) methods called ChangeTreeNodeImageIndex, ChangeTreeNodeSelectedImageIndex and ChangeTreeNodeImageIndices.
Use these and it should all work.
There is a lot to take into account when changing the image index; whether the MWTreeView is enabled or not, focused, hide selection is used etc. The methods mentioned above take into account these things.
|
|
|
|
 |
|
 |
The Control goes into an infinite loop when u set MultiSelect property to MultiSameLevel and then try to select multiple nodes by holding down the SHIFT key. Another observation is that the selection works if the FirstSelectedNode is "greater" than the LastSelectedNode. By greater i mean, its index in the sibling list is greater. Does anyone have any suggestion for this, cuz i desparately want to fix this issue.
Asim
AR
|
|
|
|
 |