Class RadTextBoxBase
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public abstract class RadTextBoxBase : RadEditorControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider
Constructors
RadTextBoxBase()
Represents RadTextBoxBase constructor
Declaration
public RadTextBoxBase()
Properties
AcceptsReturn
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.
Declaration
[RadDefaultValue("AcceptsReturn", typeof(RadTextBoxItem))]
public bool AcceptsReturn { get; set; }
Property Value
|
System.Boolean
|
AcceptsTab
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.
Declaration
[RadDefaultValue("AcceptsTab", typeof(RadTextBoxItem))]
public bool AcceptsTab { get; set; }
Property Value
|
System.Boolean
|
AutoCompleteCustomSource
Declaration
[RadDefaultValue("AutoCompleteCustomSource", typeof(HostedTextBoxBase))]
public AutoCompleteStringCollection AutoCompleteCustomSource { get; set; }
Property Value
|
System.Windows.Forms.AutoCompleteStringCollection
|
AutoCompleteMode
Declaration
[RadDefaultValue("AutoCompleteMode", typeof(HostedTextBoxBase))]
public AutoCompleteMode AutoCompleteMode { get; set; }
Property Value
|
System.Windows.Forms.AutoCompleteMode
|
AutoCompleteSource
Declaration
[RadDefaultValue("AutoCompleteSource", typeof(HostedTextBoxBase))]
public AutoCompleteSource AutoCompleteSource { get; set; }
Property Value
|
System.Windows.Forms.AutoCompleteSource
|
AutoSize
Gets or sets whether the edit control is auto-sized. Note that auto-size functionality does not work when MultiLine property is true.
Declaration
public override bool AutoSize { get; set; }
Property Value
|
System.Boolean
|
Overrides
CanUndo
Gets value indicating whether undo is allowed.
Declaration
public bool CanUndo { get; }
Property Value
|
System.Boolean
|
CharacterCasing
Gets or sets a value indicating whether the RadTextBox control modifies the case of characters as they are typed.
Declaration
public CharacterCasing CharacterCasing { get; set; }
Property Value
|
System.Windows.Forms.CharacterCasing
|
DefaultSize
Declaration
protected override Size DefaultSize { get; }
Property Value
|
System.Drawing.Size
|
Font
Gets or sets the font of the text displayed by the control.
Declaration
public override Font Font { get; set; }
Property Value
|
System.Drawing.Font
|
Overrides
HideSelection
Gets or sets a value indicating whether the selected text remains highlighted even when the RadTextBox has lost the focus.
Declaration
public bool HideSelection { get; set; }
Property Value
|
System.Boolean
|
Lines
Gets or sets the lines of text in multiline configurations.
Declaration
public string[] Lines { get; set; }
Property Value
|
System.String[]
|
MaxLength
Gets or sets the maximum number of characters allowed in the text box.
Declaration
public int MaxLength { get; set; }
Property Value
|
System.Int32
|
Modified
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.
Declaration
public bool Modified { get; set; }
Property Value
|
System.Boolean
|
Multiline
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.
Declaration
[RadDefaultValue("Multiline", typeof(RadTextBoxItem))]
public bool Multiline { get; set; }
Property Value
|
System.Boolean
|
NullText
Gets or sets the text that is displayed when the ComboBox contains a null reference.
Declaration
[RadDefaultValue("NullText", typeof(RadTextBoxItem))]
public string NullText { get; set; }
Property Value
|
System.String
|
PasswordChar
Gets or sets the character used to mask characters of a password in a single-line TextBox control.
Declaration
[RadDefaultValue("PasswordChar", typeof(RadTextBoxItem))]
public char PasswordChar { get; set; }
Property Value
|
System.Char
|
ReadOnly
Gets or sets a value indicating whether the contents of the TextBox control can be changed.
Declaration
public bool ReadOnly { get; set; }
Property Value
|
System.Boolean
|
ScrollBars
Gets or sets which scroll bars should appear in a multiline TextBox control.
Declaration
public ScrollBars ScrollBars { get; set; }
Property Value
|
System.Windows.Forms.ScrollBars
|
SelectedText
Gets or sets a value indicating the currently selected text in the control.
Declaration
public string SelectedText { get; set; }
Property Value
|
System.String
|
SelectionLength
Gets or sets the number of characters selected in the text box.
Declaration
public int SelectionLength { get; set; }
Property Value
|
System.Int32
|
SelectionStart
Gets or sets the starting point of text selected in the text box.
Declaration
public int SelectionStart { get; set; }
Property Value
|
System.Int32
|
ShortcutsEnabled
Gets or sets a value indicating whether the defined shortcuts are enabled.
Declaration
public bool ShortcutsEnabled { get; set; }
Property Value
|
System.Boolean
|
ShowNullText
Gets or sets a value indicating whether the null text will be shown when the control is focused and the text is empty.
Declaration
public bool ShowNullText { get; set; }
Property Value
|
System.Boolean
|
TabStop
Declaration
public bool TabStop { get; set; }
Property Value
|
System.Boolean
|
Text
Gets or sets the displayed text.
Declaration
public override string Text { get; set; }
Property Value
|
System.String
|
Overrides
TextAlign
Gets or sets how text is aligned in a TextBox control.
Declaration
public virtual HorizontalAlignment TextAlign { get; set; }
Property Value
|
System.Windows.Forms.HorizontalAlignment
|
TextLength
Gets the length of the text in the control.
Declaration
public int TextLength { get; }
Property Value
|
System.Int32
|
WordWrap
Gets or sets a value indicating whether a multiline text box control automatically wraps words to the beginning of the next line when necessary.
Declaration
public bool WordWrap { get; set; }
Property Value
|
System.Boolean
|
Methods
AppendText(String)
Appends text to the current text.
Declaration
public void AppendText(string text)
Parameters
|
System.String
text
|
Clear()
Empties the TextBox.
Declaration
public void Clear()
ClearUndo()
Undo to the previous text value before clear invocation.
Declaration
public void ClearUndo()
Copy()
Copies the text value to the clipboard.
Declaration
public void Copy()
Cut()
Cuts the text value to the clipboard.
Declaration
public void Cut()
DeselectAll()
Deselects the text in the cotrol.
Declaration
public void DeselectAll()
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
|
System.Boolean
disposing
|
Overrides
Focus()
Sets input focus to the control.
Declaration
public bool Focus()
Returns
|
System.Boolean
true if the input focus request was successful; otherwise, false. |
GetCharFromPosition(Point)
Retrieves the character that is closest to the specified location within the control.
Declaration
public char GetCharFromPosition(Point point)
Parameters
|
System.Drawing.Point
point
|
Returns
|
System.Char
|
GetCharIndexFromPosition(Point)
Retrieves the index of the character nearest to the specified location.
Declaration
public int GetCharIndexFromPosition(Point point)
Parameters
|
System.Drawing.Point
point
|
Returns
|
System.Int32
|
GetFirstCharIndexFromLine(Int32)
Retrieves the index of the first character of a given line.
Declaration
public int GetFirstCharIndexFromLine(int lineNumber)
Parameters
|
System.Int32
lineNumber
|
Returns
|
System.Int32
|
GetFirstCharIndexOfCurrentLine()
Retrieves the index of the first character of the current line. This method is not supported by MaskedTextBox.
Declaration
public int GetFirstCharIndexOfCurrentLine()
Returns
|
System.Int32
|
GetLineFromCharIndex(Int32)
Retrieves the line number from the specified character position within the text of the control.
Declaration
public int GetLineFromCharIndex(int index)
Parameters
|
System.Int32
index
|
Returns
|
System.Int32
|
GetPositionFromCharIndex(Int32)
Retrieves the location within the control at the specified character index.
Declaration
public Point GetPositionFromCharIndex(int index)
Parameters
|
System.Int32
index
|
Returns
|
System.Drawing.Point
|
InitializeTextElement()
Initializes textbox's children
Declaration
protected abstract void InitializeTextElement()
OnAcceptsTabChanged(EventArgs)
Raises the AcceptsTabChanged event.
Declaration
protected virtual void OnAcceptsTabChanged(EventArgs e)
Parameters
|
System.EventArgs
e
|
OnHideSelectionChanged(EventArgs)
Raises the HideSelectionChanged event.
Declaration
protected virtual void OnHideSelectionChanged(EventArgs e)
Parameters
|
System.EventArgs
e
|
OnLostFocus(EventArgs)
Declaration
protected override void OnLostFocus(EventArgs e)
Parameters
|
System.EventArgs
e
|
Overrides
OnModifiedChanged(EventArgs)
Raises the ModifiedChanged event.
Declaration
protected virtual void OnModifiedChanged(EventArgs e)
Parameters
|
System.EventArgs
e
|
OnMultilineChanged(EventArgs)
Raises the MultilineChanged event.
Declaration
protected virtual void OnMultilineChanged(EventArgs e)
Parameters
|
System.EventArgs
e
|
OnReadOnlyChanged(EventArgs)
Raises the ReadOnlyChanged event.
Declaration
protected virtual void OnReadOnlyChanged(EventArgs e)
Parameters
|
System.EventArgs
e
|
OnTextAlignChanged(EventArgs)
Raises the TextAlignChanged event.
Declaration
protected virtual void OnTextAlignChanged(EventArgs e)
Parameters
|
System.EventArgs
e
|
OnTextChanging(TextChangingEventArgs)
Raises the TextChanging event.
Declaration
protected virtual void OnTextChanging(TextChangingEventArgs e)
Parameters
|
TextChangingEventArgs
e
|
Paste()
Pastes the text value to the clipboard.
Declaration
public void Paste()
Paste(String)
Pastes the string parameter to the clipboard.
Declaration
public void Paste(string text)
Parameters
|
System.String
text
|
ProcessAutoSizeChanged(Boolean)
Declaration
protected override void ProcessAutoSizeChanged(bool value)
Parameters
|
System.Boolean
value
|
Overrides
ScrollToCaret()
Scrolls the contents of the control to the current caret position.
Declaration
public void ScrollToCaret()
Select()
Activates the control.
Declaration
public void Select()
Select(Int32, Int32)
Selects the text in the TextBox from the start position inclusive to the end position exclusive.
Declaration
public void Select(int start, int length)
Parameters
|
System.Int32
start
|
|
System.Int32
length
|
SelectAll()
Selects the text in the TextBox.
Declaration
public void SelectAll()
Undo()
Undoes the last edit operation in the text box.
Declaration
public void Undo()
UnwireHostEvents()
Declaration
protected virtual void UnwireHostEvents()
WireHostEvents()
Declaration
protected virtual void WireHostEvents()
WndProc(ref Message)
Declaration
protected override void WndProc(ref Message m)
Parameters
|
System.Windows.Forms.Message
m
|
Overrides
Events
AcceptsTabChanged
Occurs when the value of the AcceptsTab property has changed.
Declaration
public event EventHandler AcceptsTabChanged
Event Type
|
System.EventHandler
|
HideSelectionChanged
Occurs when the value of the HideSelection property changes.
Declaration
public event EventHandler HideSelectionChanged
Event Type
|
System.EventHandler
|
ModifiedChanged
Occurs when the value of the Modified property has changed.
Declaration
public event EventHandler ModifiedChanged
Event Type
|
System.EventHandler
|
MultilineChanged
Occurs when the value of the Multiline property has changed.
Declaration
public event EventHandler MultilineChanged
Event Type
|
System.EventHandler
|
ReadOnlyChanged
Occurs when the ReadOnly property changes.
Declaration
public event EventHandler ReadOnlyChanged
Event Type
|
System.EventHandler
|
TextAlignChanged
Occurs when the value of the TextAlign property has changed.
Declaration
public event EventHandler TextAlignChanged
Event Type
|
System.EventHandler
|
TextChanging
Occurs when text is being changed.
Declaration
public event TextChangingEventHandler TextChanging
Event Type
|
TextChangingEventHandler
|