Table of Contents

Class ValidatingTextEditor

Namespace
NanoByte.StructureEditor.WinForms
Assembly
NanoByte.StructureEditor.WinForms.dll

A text editor that automatically validates changes using an external callback after a short period of no input.

public class ValidatingTextEditor : UserControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl
Inheritance
ValidatingTextEditor
Implements
Inherited Members

Constructors

ValidatingTextEditor()

public ValidatingTextEditor()

Properties

EnableRedo

Indicates whether Redo() is currently available.

public bool EnableRedo { get; }

Property Value

bool

EnableUndo

Indicates whether Undo() is currently available.

public bool EnableUndo { get; }

Property Value

bool

TextEditor

The text editor control used internally.

public TextEditorControl TextEditor { get; }

Property Value

TextEditorControl

Methods

ClearUndoStack()

Clears the undo stack of the underlying text editor control.

public void ClearUndoStack()

Dispose(bool)

Releases the unmanaged resources used by the Control and its child controls and optionally releases the managed resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Redo()

Executes the redo method of the underlying text editor control.

public void Redo()

SetContent(string, string)

Sets a new text to be edited.

public void SetContent(string text, string format)

Parameters

text string

The text to set.

format string

The format named used to determine the highlighting scheme (e.g. XML).

Undo()

Executes the undo method of the underlying text editor control.

public void Undo()

Events

ContentChanged

Raised when changes have accumulated after a short period of no input.

public event Action<string>? ContentChanged

Event Type

Action<string>