RadTextBoxBase
Base class for Telerik text-box controls that expose editing through a hosted WinForms text box.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[DefaultBindingProperty("Text")]
public abstract class RadTextBoxBase : RadEditorControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadEditorControlRadTextBoxBase...
Implements:
Inherited Members
Constructors
Represents RadTextBoxBase constructor
public RadTextBoxBase()
Properties
Gets or sets a value indicating whether pressing ENTER in a multiline RadTextBox control creates a new line of text in the control or activates the default button for the form.
public bool AcceptsReturn { get; set; }
Gets or sets a value indicating whether pressing the TAB key in a multiline text box control types a TAB character in the control instead of moving the focus to the next control in the tab order.
public bool AcceptsTab { get; set; }
Gets or sets the custom completion strings used when AutoCompleteSource selects a custom source.
[Browsable(true)]
public AutoCompleteStringCollection AutoCompleteCustomSource { get; set; }
Gets or sets how the hosted text box completes input from the selected AutoCompleteSource.
[Browsable(true)]
public AutoCompleteMode AutoCompleteMode { get; set; }
Gets or sets the source of completion strings used by the hosted text box.
[Browsable(true)]
[TypeConverter(typeof(TextBoxAutoCompleteSourceConverter))]
public AutoCompleteSource AutoCompleteSource { get; set; }
Gets or sets whether the edit control is auto-sized. Note that auto-size functionality does not work when MultiLine property is true.
[Browsable(true)]
public override bool AutoSize { get; set; }
Overrides:
Gets or sets a value indicating whether the RadTextBox control modifies the case of characters as they are typed.
public CharacterCasing CharacterCasing { get; set; }
Gets the default size used when the control is created without an explicit size.
protected override Size DefaultSize { get; }
A size with a width of 100 and a height of 20.
Overrides:
Gets or sets the font of the text displayed by the control.
public override Font Font { get; set; }
Overrides:
Gets or sets a value indicating whether the selected text remains highlighted even when the RadTextBox has lost the focus.
public bool HideSelection { get; set; }
Gets or sets the lines of text in multiline configurations.
public string[] Lines { get; set; }
Gets or sets the maximum number of characters allowed in the text box.
public int MaxLength { get; set; }
Gets or sets a value indicating whether the RadTextBox control has been modified by the user since the control was created or since its contents were last set.
public bool Modified { get; set; }
Gets or sets a value indicating whether this is a multiline TextBox control. When the value is true, the AutoSize property is automatically changed to false and the user needs to take care of the height of this control.
public bool Multiline { get; set; }
Gets or sets the text that is displayed when the ComboBox contains a null reference.
public string NullText { get; set; }
Gets or sets the character used to mask characters of a password in a single-line TextBox control.
public char PasswordChar { get; set; }
Gets or sets a value indicating whether the contents of the TextBox control can be changed.
public bool ReadOnly { get; set; }
Gets or sets which scroll bars should appear in a multiline TextBox control.
public ScrollBars ScrollBars { get; set; }
Gets or sets a value indicating the currently selected text in the control.
public string SelectedText { get; set; }
Gets or sets the number of characters selected in the text box.
public int SelectionLength { get; set; }
Gets or sets the starting point of text selected in the text box.
public int SelectionStart { get; set; }
Gets or sets a value indicating whether the defined shortcuts are enabled.
public bool ShortcutsEnabled { get; set; }
Gets or sets a value indicating whether the null text will be shown when the control is focused and the text is empty.
public bool ShowNullText { get; set; }
Gets or sets whether keyboard tab navigation can focus the text-box item; before item initialization, the base control value is used.
public bool TabStop { get; set; }
Gets or sets how text is aligned in a TextBox control.
public virtual HorizontalAlignment TextAlign { get; set; }
Gets the length of the text in the control.
public int TextLength { get; }
Methods
Appends text to the current text.
Empties the TextBox.
public void Clear()
Undo to the previous text value before clear invocation.
public void ClearUndo()
Copies the text value to the clipboard.
public void Copy()
Cuts the text value to the clipboard.
public void Cut()
Deselects the text in the cotrol.
public void DeselectAll()
Sets input focus to the control.
public bool Focus()
true if the input focus request was successful; otherwise, false.
Retrieves the index of the first character of the current line. This method is not supported by MaskedTextBox.
Initializes textbox's children
protected abstract void InitializeTextElement()
Raises the AcceptsTabChanged event.
Raises the HideSelectionChanged event.
Suppresses the wrapper's lost-focus notification while focus is being transferred to the hosted text box.
protected override void OnLostFocus(EventArgs e)
The focus event data.
Overrides:
Raises the ModifiedChanged event.
Raises the MultilineChanged event.
Raises the ReadOnlyChanged event.
Raises the TextAlignChanged event.
Raises the TextChanging event.
Pastes the text value to the clipboard.
public void Paste()
Pastes the string parameter to the clipboard.
Scrolls the contents of the control to the current caret position.
public void ScrollToCaret()
Activates the control.
public void Select()
Selects the text in the TextBox.
public void SelectAll()
Undoes the last edit operation in the text box.
public void Undo()
Removes the subscriptions installed by WireHostEvents().
protected virtual void UnwireHostEvents()
Subscribes the wrapper to text-item notifications and focus events from the hosted text box.
protected virtual void WireHostEvents()
Transfers focus to the hosted text box when the wrapper receives a focus message.
protected override void WndProc(ref Message m)
The window message processed by the control.
Overrides:
Events
Occurs when the value of the AcceptsTab property has changed.
[Browsable(true)]
public event EventHandler AcceptsTabChanged
Occurs when the value of the HideSelection property changes.
[Browsable(true)]
public event EventHandler HideSelectionChanged
Occurs when the value of the Modified property has changed.
[Browsable(true)]
public event EventHandler ModifiedChanged
Occurs when the value of the Multiline property has changed.
[Browsable(true)]
public event EventHandler MultilineChanged
Occurs when the ReadOnly property changes.
[Browsable(true)]
public event EventHandler ReadOnlyChanged
Occurs when the value of the TextAlign property has changed.
[Browsable(true)]
public event EventHandler TextAlignChanged
Occurs when text is being changed.
[Browsable(true)]
public event TextChangingEventHandler TextChanging