Beispiel #1
0
        protected void editOnKeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Return)
            {
                getEdit().LostFocus -= FEdit_LostFocus;

                VirtualTreeNode node   = FNode;
                int             column = FColumn;

                string s = getText();



                if ((FCntNewText == 0) && (FText != s))
                {
                    FTree.NewText(node, column, s);
                }
                FCntNewText++;
                FTree.RemoveControl(getEdit());
                FTree.EndUpdate();
                e.Handled    = true;
                FEdit.KeyUp -= editOnKeyUp;
            }
            else
            if (e.KeyCode == Keys.Escape)
            {
                getEdit().LostFocus -= FEdit_LostFocus;

                FTree.RemoveControl(getEdit());


                FTree.EndUpdate();
                FTree.ReDrawTree();
                e.Handled = true;
            }
        }
Beispiel #2
0
 public Editor(VirtualTreeView tree, VirtualTreeNode node, int column)
 {
     FTree   = tree;
     FNode   = node;
     FColumn = column;
 }
Beispiel #3
0
        public DateEditor(VirtualTreeView tree, VirtualTreeNode node, int column) : base(tree, node, column)
        {
            var edit = new DateTimePicker();

            setEdit(edit);
        }
Beispiel #4
0
        public TextEditor(VirtualTreeView tree, VirtualTreeNode node, int column) : base(tree, node, column)
        {
            var edit = new TextBox();

            setEdit(edit);
        }