Table of Contents

Interface ITextBoxHandler

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Contains properties and methods which allow to work with text box control.

public interface ITextBoxHandler : IControlHandler, IDisposableObject, IDisposable

Properties

AutoUrl

Gets or sets a value indicating whether urls in the input text are highlighted and underlined.

CanCopy

Gets a value indicating whether the current selection can be copied, which allows theCopy() method to succeed.

CanCut

Gets a value indicating whether the current selection can be cut, which allows theCut() method to succeed.

CanPaste

Gets a value indicating whether the current selection can be replaced with the contents of the Clipboard, which allows thePaste() method to succeed.

CanRedo

Gets a value indicating whether the user can redo the previous operation in the control.

CanUndo

Gets a value indicating whether the user can undo the previous operation in the control.

EmptyTextHint

Gets or sets a hint shown in an empty unfocused text control.

HasBorder

Gets or sets a value indicating whether the control has a border.

HasSelection

Gets whether control has selected text.

HideSelection

Gets or sets a value indicating whether the selected text in the text box control remains highlighted when the control loses focus.

HideVertScrollbar

Gets or sets a value indicating whether vertical scrollbar is hidden in the control.

IsEmpty

Gets whether control contains text.

IsModified

Gets or sets whether text is modified in the control.

IsPassword

Gets or sets a value indicating whether the input text is password and all characters are shown as *.

IsRichEdit

Gets or sets a value indicating whether text control is in rich edit mode

Multiline

Gets or sets a value indicating whether this is a multiline text box control.

ProcessEnter

Gets or sets a value indicating whether the EnterPressed event is fired.

ProcessTab

Gets or sets a value indicating whether the TAB key is received and processed by the control.

ReadOnly

Gets or sets a value indicating whether text in the text box is read-only.

ReportedUrl

Gets url at current position of the cursor. This property is only valid in the event handler.

TextAlign

Gets or sets text alignment for the TextBox control.

TextWrap

Gets or sets text wrap style fot the multiline TextBox controls.

Methods

AppendText(string)

Appends the text to the end of the text control.

Clear()

Clears all text in the control.

Copy()

Copies the current selection in the control to the Clipboard.

CreateTextAttr()

Creates new custom text style.

Cut()

Moves the current selection in the control to the Clipboard.

EmptyUndoBuffer()

Clears internal undo buffer. No undo operations are available after this operation.

GetDefaultStyle()

Returns the style currently used for the new text.

GetInsertionPoint()

Returns the insertion point, or cursor, position.

GetLastPosition()

Returns the zero based index of the last position in the text control, which is equal to the number of characters in the control.

GetLineLength(long)

Gets the length of the specified line, not including any trailing newline character(s).

GetLineText(long)

Returns the contents of a given line in the text control, not including any trailing newline character(s).

GetNumberOfLines()

Returns the number of lines in the text control buffer.

GetRange(long, long)

Returns the string containing the text starting in the positions from and up to to in the control.

GetSelectionEnd()

Gets the current selection end position.

GetSelectionStart()

Gets the current selection start position.

GetStringSelection()

Gets the text currently selected in the control.

GetStyle(long)

Returns the style at this position in the text control.

IsValidPosition(long)

Return true if the given position is valid, i.e. positive and less than the last position.

Paste()

Replaces the current selection in the control with the contents of the Clipboard.

PositionToCoords(long)

Converts given text position to client coordinates in pixels.

PositionToXY(long)

Converts given position to a zero-based column, line number pair.

Redo()

Redos the last edit operation in the control.

Remove(long, long)

Removes the text starting at the first given position up to(but not including) the character at the last position.

Replace(long, long, string)

Replaces the text starting at the first position up to(but not including) the character at the last position with the given text.

SelectAll()

Selects all text in the control.

SelectNone()

Clears selection. All text becomes unselected.

SetDefaultStyle(ITextBoxTextAttr)

Changes the default style to use for the new text which is going to be added to the control using WriteText(string) or AppendText(string).

SetInsertionPoint(long)

Sets the insertion point at the given position.

SetInsertionPointEnd()

Sets the insertion point at the end of the text control.

SetMaxLength(ulong)

Sets maximal possible text length.

SetSelection(long, long)

Selects the text starting at the first position up to (but not including) the character at the last position.

SetStyle(long, long, ITextBoxTextAttr)

Changes the style of the given range.

SetValidator(IValueValidator?)

Sets text validator.

ShowPosition(long)

Makes the line containing the given position visible.

Undo()

Undoes the last edit operation in the control.

WriteText(string)

Writes the text into the text control at the current insertion position.

XYToPosition(long, long)

Converts the given zero based column and line number to a position.