System.Windows.Forms.TextBoxBase.Cut C# (CSharp) Method

Cut() public method

public Cut ( ) : void
return void
		public void Cut ()
		{
			m_helper.TextView.Cut(this);

			Modified = true;
			OnTextChanged (EventArgs.Empty);
		}

Usage Example

Example #1
0
        /// <summary>
        /// Does application-wide cut
        /// </summary>
        public static void Cut()
        {
            Control activeControl = Application.ActiveControl;

            if (activeControl == null)
            {
                return;
            }

            System.Windows.Forms.TextBoxBase active = activeControl as System.Windows.Forms.TextBoxBase;
            if (active != null)
            {
                active.Cut();
                return;
            }

            System.Windows.Forms.WebBrowser webbrowser = activeControl as System.Windows.Forms.WebBrowser;
            if (webbrowser != null)
            {
                WebBrowserHelper.ExecCopy(webbrowser);
                ///TODO: don't work in unix
                return;
            }

            MethodInfo method = activeControl.GetType().GetMethod("Cut");

            if (method != null)
            {
                FunctionWithoutReturn getMethod = (FunctionWithoutReturn)Delegate.CreateDelegate
                                                      (typeof(FunctionWithoutReturn), activeControl, method);

                getMethod();
            }
        }