MoveByKey() public method

Return the selection that should be produced by a KeyDown event with the specified arguments. If the argument does not specify a key-moving event or it is not possible to move (e.g., left arrow at start of document), return null.
public MoveByKey ( KeyEventArgs args ) : Selection
args System.Windows.Forms.KeyEventArgs
return Selection
        /// <summary>
        /// Return true if Delete() will delete something. Default is that it will not.
        /// </summary>
        public override bool CanDelete()
        {
            var sel = new InsertionPoint(Hookup, StringPosition, AssociatePrevious);

            sel = sel.MoveByKey(new KeyEventArgs(Keys.Right)) as InsertionPoint;
            return(Hookup.CanDelete(this, sel));
        }
示例#2
0
		/// <summary>
		/// Return true if Delete() will delete something. Default is that it will not.
		/// </summary>
		public override bool CanDelete()
		{
			var sel = new InsertionPoint(Hookup, StringPosition, AssociatePrevious);
			sel = sel.MoveByKey(new KeyEventArgs(Keys.Right))as InsertionPoint;
			return Hookup.CanDelete(this, sel);
		}