GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoText Class / DoEdit Method
In This Topic
    DoEdit Method
    In This Topic
    Called when a user tries to commit a text edit.
    Syntax
    public virtual bool DoEdit( 
       GoView view,
       string oldtext,
       string newtext
    )

    Parameters

    view
    oldtext
    newtext

    Return Value

    true to call DoEndEdit to stop editing; false to continue editing. The default value is true.
    Remarks

    This is normally called from the control that is setting a new string for this text object as a result of the user having finished editing the text. By default it just sets this object's Text property to the result of a call to ComputeEdit: Text = ComputeEdit(oldtext, newtext). You can override this method to prevent the text value from being set, or you can override ComputeEdit to constrain the new text value. If you intend to bring up a message box or other focus-taking activity, call GoView.GoView.DoCancelMouse first, to make sure no tool is started if the user had clicked elsewhere in the view.

    Call DoBeginEdit to programmatically have the user start editing this text object; call DoEndEdit to stop any editing that the user might be doing. However, you should not be calling either of those methods from an override of this method.

    See Also