• C#实现拖拽


            private void dgvPbom_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
            {
                dgvPbom.DoDragDrop(e.ColumnIndex, DragDropEffects.Copy);
            }

            private void txtProjectCode_DragEnter(object sender, DragEventArgs e)
            {
                if (e.Data.GetDataPresent(typeof(int)))
                {
                    e.Effect = DragDropEffects.Copy;
                }
                else
                    e.Effect = DragDropEffects.None;
            }

            private void txtProjectCode_DragDrop(object sender, DragEventArgs e)
            {
                int index = -1;
                if (e.Data.GetDataPresent(typeof(int)))
                    index = (int)e.Data.GetData(typeof(int));
                if (index > -1)
                    txtProjectCode.Text = dgvPbom.Columns[index].Name;
            }

  • 相关阅读:
    LUA表的引用理解
    UNITY 打包安卓APK
    UNITY打包问题
    U3D 打包时找不到tag的问题
    break prefab instance的原理
    C#调用LUA函数
    LUA 利用#遍历表的问题
    U3D笔记11:47 2016/11/30-15:15 2016/12/19
    Unity3D 预设打包的注意事项
    回调 和 覆盖
  • 原文地址:https://www.cnblogs.com/saptechnique/p/1398853.html
Copyright © 2020-2023  润新知