Example #1
0
 private void OnPaste(Object sender, PasteEventArgs e)
 {
     Text = e.Text;
     foreach (FieldControl fc in _fieldControls)
     {
         if (fc.Focused)
         {
             fc.SelectionStart = fc.TextLength;
             break;
         }
     }
 }
Example #2
0
 private void OnPaste()
 {
     if (Clipboard.ContainsText())
     {
         string text = Clipboard.GetText();
         if (IsValue(text))
         {
             Text           = text;
             SelectionStart = TextLength;
         }
         else
         {
             if (null != PasteEvent)
             {
                 PasteEventArgs args = new PasteEventArgs();
                 args.FieldIndex = FieldIndex;
                 args.Text       = text;
                 PasteEvent(this, args);
             }
         }
     }
 }