i am new to C#,
i have a multiselection treeview, where if i select a nodes with ctrl and shift corresponding nodes will be copied to another treenode,
i want to unselect the childnode selection with ctrl and shift if parent node is selected.
i think of disablin the mouse click event inside that treenode if parent node is selected?
Expand|Select|Wrap|Line Numbers
- private void treeViewMS1_AfterSelect(object sender, TreeViewEventArgs e)
- {
- MyKeyEvent kEv = new MyKeyEvent();
- bool kControl2 = (ModifierKeys == Keys.Control);
- bool kShift2 = (ModifierKeys == Keys.Shift);
- bool mClick = (MouseButtons == MouseButtons.Left);
- // bool parent =IsP
- if (e.Node.Text == "WeldDataFile")
- {
- if ((kControl2) && (mClick))
- {
- // OnKeyAction(this, kEv);
- //Here i have to disable mouse event till i copy that selected node to another treeview
- }
- else if ((kShift2) && (mClick))
- {
- //OnKeyAction(this, kEv);
- //Here i have to disable mouse event till i copy that selected node to another treeview
- }
- }
- }