ListBox拖拽Item项到TreeView
来源:互联网 发布:c语言程序流程图软件 编辑:程序博客网 时间:2024/06/03 21:58
private void treeView1_DragDrop(object sender, DragEventArgs e) { string item = (string)e.Data.GetData(e.Data.GetFormats()[0]);//获取拖拽的数据:获取可以转换的格式,然后转换成数据 this.treeView1.Nodes.Add(item); //添加数据到TreeView.Item项里面 } private void listBox1_MouseDown(object sender, MouseEventArgs e) { if (this.listBox1.SelectedItem != null)//如果拖拽了Item项的话 { this.listBox1.DoDragDrop(this.listBox1.SelectedItem, DragDropEffects.Copy);//设置要拖拽的内容,和拖拽样式 } } private void treeView1_DragEnter_1(object sender, DragEventArgs e) { e.Effect = DragDropEffects.Copy;//鼠标进入后,设置拖拽样式为复制 }
0 0
- ListBox拖拽Item项到TreeView
- 把一个listbox中的item移动到另一个listbox里
- ListBox&TreeView
- TreeView ListBox Combox
- C#中ListBox控件重绘Item项
- listbox的item项可转换为DataRowView
- ListBox脚本控制:项从一个ListBox移动到另一个ListBox
- Move the Item of ListBox
- 两个ListBox中的Item互换
- WPF重写ListBox的item
- Listbox 实现Item双击事件
- listbox导出到文件
- ListBox中增加item的双击事件
- ListBox Item数据绑定遇到的问题
- 拖放操作-实现Treeview到Treeview和DataGridView到Treeview
- 数据绑定到TreeView
- 添加到ListBox时异常
- 循环添加数据到listBox
- 自定义Toast
- Java中的引用传递
- 开启了3DsMax的学习之路
- 【编程习惯】对运行时异常(RuntimeError)代码的定位。针对C,C++以及大多数无虚拟机编程语言。
- 如果快速接手一个复杂的系统
- ListBox拖拽Item项到TreeView
- 易语言调用GetPrivateProfileStringA
- 【Light】[1294]Positive Negative Sign
- IntelliJ IDEA快捷键总结
- 插入排序InserSort
- JDBC初识
- 关于类型转换、溢出、移位等操作的小总结
- 百度地图打标展示地点分布图 ,如何利用百度地图API进行标注
- (转)cocoapods使用教程