Class RadTextBoxControl
Enables the user to enter text, and provides multiline editing
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[TelerikToolboxCategory("Editors")]
[ClassInterface(ClassInterfaceType.AutoDispatch)]
[ComVisible(true)]
public class RadTextBoxControl : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider
Constructors
RadTextBoxControl()
Properties
AcceptsReturn
Gets or sets a value indicating whether pressing ENTER in a multiline TextBox control creates a new line of text in the control or activates the default button for the form.
Declaration
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 element types a TAB character in the element instead of moving the focus to the next element in the tab order.
Declaration
public bool AcceptsTab { get; set; }
Property Value
System.Boolean
|
AutoCompleteDataSource
Gets or sets a value specifying the source of complete items used for automatic completion.
Declaration
public object AutoCompleteDataSource { get; set; }
Property Value
System.Object
The auto complete data source. |
AutoCompleteDisplayMember
Gets or sets the auto complete display member.
Declaration
public string AutoCompleteDisplayMember { get; set; }
Property Value
System.String
The auto complete display member. |
AutoCompleteItems
Gets a value specifying the complete items used for automatic completion.
Declaration
public RadListDataItemCollection AutoCompleteItems { get; }
Property Value
RadListDataItemCollection
|
AutoCompleteMode
Gets or sets an option that controls how automatic completion works for the TextBox.
Declaration
public virtual AutoCompleteMode AutoCompleteMode { get; set; }
Property Value
System.Windows.Forms.AutoCompleteMode
The auto complete mode. |
AutoSize
Gets or sets a value indicating whether the control is automatically resized to display its entire contents. AutoSize for RadTextBoxControl is affecting only the height of the control.
Declaration
public override bool AutoSize { get; set; }
Property Value
System.Boolean
|
Overrides
CaretIndex
Gets or sets the caret position.
Declaration
public int CaretIndex { get; set; }
Property Value
System.Int32
The index of the caret. |
CharacterCasing
Gets or sets whether the TextBox control modifies the case of characters as they are typed.
Declaration
public CharacterCasing CharacterCasing { get; set; }
Property Value
System.Windows.Forms.CharacterCasing
The character casing. |
DefaultSize
Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size
|
DropDownMaxSize
Gets or sets the size of the drop down max.
Declaration
public Size DropDownMaxSize { get; set; }
Property Value
System.Drawing.Size
The size of the drop down max. |
DropDownMinSize
Gets or sets the size of the drop down min.
Declaration
public Size DropDownMinSize { get; set; }
Property Value
System.Drawing.Size
The size of the drop down min. |
EmbeddedLabelText
Gets or sets the text of the embedded label.
Declaration
public string EmbeddedLabelText { get; set; }
Property Value
System.String
|
HideSelection
Gets or sets a value indicating whether the selected text in the text box control remains highlighted when the element loses focus.
Declaration
public bool HideSelection { get; set; }
Property Value
System.Boolean
|
HorizontalScrollBarState
Gets or sets when the horizontal scroll bar should appear in a multiline TextBox.
Declaration
public ScrollState HorizontalScrollBarState { get; set; }
Property Value
ScrollState
The state of the horizontal scroll bar. |
ImageList
Declaration
public override ImageList ImageList { get; set; }
Property Value
System.Windows.Forms.ImageList
|
Overrides
IsReadOnly
Gets or sets a value indicating whether text in the text box is read-only.
Declaration
public bool IsReadOnly { get; set; }
Property Value
System.Boolean
|
IsReadOnlyCaretVisible
Gets or sets a value indicating whether the caret is visible in read only mode.
Declaration
public bool IsReadOnlyCaretVisible { get; set; }
Property Value
System.Boolean
|
Lines
Gets or sets the lines of text in a text box control.
Declaration
public string[] Lines { get; set; }
Property Value
System.String[]
The lines. |
ListElement
Gets the auto-complete list element.
Declaration
public RadTextBoxListElement ListElement { get; }
Property Value
RadTextBoxListElement
|
MaxDropDownItemCount
Gets or sets the max count of visible items in auto-complete drop down
Declaration
public int MaxDropDownItemCount { get; set; }
Property Value
System.Int32
The max drop down item count. |
MaxLength
Gets or sets the maximum number of characters the user can type or paste into the text box element.
Declaration
public int MaxLength { get; set; }
Property Value
System.Int32
The length of the max. |
Multiline
Gets or sets a value indicating whether this is a multiline text box.
Declaration
public bool Multiline { get; set; }
Property Value
System.Boolean
|
NullText
Gets or sets the prompt text that is displayed when the text box contains no text.
Declaration
public string NullText { get; set; }
Property Value
System.String
The null text. |
NullTextColor
Gets or sets the color of the null text.
Declaration
public Color NullTextColor { get; set; }
Property Value
System.Drawing.Color
The color of the null text. |
PasswordChar
Gets or sets the character used to mask characters of a password in a single-line
Declaration
public virtual char PasswordChar { get; set; }
Property Value
System.Char
|
RadContextMenu
Gets or sets the shortcut menu associated with the control.
Declaration
public virtual RadContextMenu RadContextMenu { get; set; }
Property Value
RadContextMenu
|
SelectedText
Gets or sets a value indicating the currently selected text in the text box.
Declaration
public string SelectedText { get; set; }
Property Value
System.String
The selected text. |
SelectionColor
Gets or sets the color of the selection.
Declaration
public Color SelectionColor { get; set; }
Property Value
System.Drawing.Color
The color of the selection. |
SelectionLength
Gets or sets the number of characters selected in the text box.
Declaration
public int SelectionLength { get; set; }
Property Value
System.Int32
The length of the selection. |
SelectionOpacity
Gets or sets the selection opacity.
Declaration
public int SelectionOpacity { get; set; }
Property Value
System.Int32
The selection opacity. |
SelectionStart
Gets or sets the starting point of text selected in the text box.
Declaration
public int SelectionStart { get; set; }
Property Value
System.Int32
The selection start. |
ShowClearButton
Gets or sets a value indicating whether the clear button is shown.
Declaration
public bool ShowClearButton { get; set; }
Property Value
System.Boolean
|
ShowEmbeddedLabel
Gets or sets a value indicating whether the embedded label is shown. It is recommended to set AutoSize to true, when using the embedded label.
Declaration
public bool ShowEmbeddedLabel { 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
|
Text
Gets or sets the current text in the text box element.
Declaration
public override string Text { get; set; }
Property Value
System.String
|
Overrides
TextAlign
Gets or sets how the text is horizontally aligned in the element.
Declaration
public HorizontalAlignment TextAlign { get; set; }
Property Value
System.Windows.Forms.HorizontalAlignment
The horizontal text alignment. |
TextBoxElement
Gets the associated text box element.
Declaration
public RadTextBoxControlElement TextBoxElement { get; }
Property Value
RadTextBoxControlElement
|
TextLength
Gets the length of text in the element.
Declaration
public int TextLength { get; }
Property Value
System.Int32
The length of the text. |
UseSystemPasswordChar
Gets or sets a value indicating whether the text in view should appear as the default password character.
Declaration
public virtual bool UseSystemPasswordChar { get; set; }
Property Value
System.Boolean
|
VerticalScrollBarState
Gets or sets when the vertical scroll bar should appear in a multiline TextBox.
Declaration
public ScrollState VerticalScrollBarState { get; set; }
Property Value
ScrollState
The state of the vertical scroll bar. |
WordWrap
Indicates 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 of a text box.
Declaration
public void AppendText(string text)
Parameters
System.String
text
The text. |
Clear()
Clears all text from the text box element.
Declaration
public void Clear()
Copy()
Copies the current selection in the text box to the Clipboard.
Declaration
public bool Copy()
Returns
System.Boolean
|
CreateAccessibilityInstance()
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
System.Windows.Forms.AccessibleObject
|
CreateChildItems(RadElement)
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
RadElement
parent
|
Overrides
CreateTextBoxElement()
Creates the associated text box element.
Declaration
protected virtual RadTextBoxControlElement CreateTextBoxElement()
Returns
RadTextBoxControlElement
|
Cut()
Moves the current selection in the text box to the Clipboard.
Declaration
public bool Cut()
Returns
System.Boolean
|
Delete()
Deletes the text at current position
Declaration
public bool Delete()
Returns
System.Boolean
|
Delete(Boolean)
Deletes the text at the next current position
Declaration
public bool Delete(bool nextCharacter)
Parameters
System.Boolean
nextCharacter
if set to |
Returns
System.Boolean
|
Delete(Boolean, Boolean)
Deletes the text at the next current position
Declaration
public bool Delete(bool nextCharacter, bool isControlPressed)
Parameters
System.Boolean
nextCharacter
if set to |
System.Boolean
isControlPressed
True if Control modifier key is pressed. If set to true - it will delete to the end of the word. |
Returns
System.Boolean
|
DeselectAll()
Specifies that the value of the SelectionLength property is zero so that no characters are selected in the element.
Declaration
public bool DeselectAll()
Returns
System.Boolean
|
Insert(String)
Inserts the specified text to the textbox
Declaration
public bool Insert(string text)
Parameters
System.String
text
The text. |
Returns
System.Boolean
|
OnGotFocus(EventArgs)
Declaration
protected override void OnGotFocus(EventArgs e)
Parameters
System.EventArgs
e
|
Overrides
OnKeyPress(KeyPressEventArgs)
Declaration
protected override void OnKeyPress(KeyPressEventArgs e)
Parameters
System.Windows.Forms.KeyPressEventArgs
e
|
Overrides
OnLoad(Size)
Declaration
protected override void OnLoad(Size desiredSize)
Parameters
System.Drawing.Size
desiredSize
|
Overrides
OnLostFocus(EventArgs)
Declaration
protected override void OnLostFocus(EventArgs e)
Parameters
System.EventArgs
e
|
Overrides
OnTextChanging(TextChangingEventArgs)
Raises the TextChanging event.
Declaration
protected virtual void OnTextChanging(TextChangingEventArgs e)
Parameters
TextChangingEventArgs
e
The TextChangingEventArgs instance containing the event data. |
Paste()
Replaces the current selection in the text box with the contents of the Clipboard.
Declaration
public bool Paste()
Returns
System.Boolean
|
ProcessAutoSizeChanged(Boolean)
Declaration
protected override void ProcessAutoSizeChanged(bool value)
Parameters
System.Boolean
value
|
Overrides
ProcessDialogChar(Char)
Declaration
protected override bool ProcessDialogChar(char charCode)
Parameters
System.Char
charCode
|
Returns
System.Boolean
|
ProcessMnemonic(Char)
Declaration
protected override bool ProcessMnemonic(char charCode)
Parameters
System.Char
charCode
|
Returns
System.Boolean
|
Overrides
ResetBackColorThemeOverrides()
Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
ResetForeColorThemeOverrides()
Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
ScrollToCaret()
Scrolls the contents of the control to the current caret position.
Declaration
public void ScrollToCaret()
Select(Int32, Int32)
Selects a range of text in the text box.
Declaration
public void Select(int start, int length)
Parameters
System.Int32
start
The selection start |
System.Int32
length
The selection length |
SelectAll()
Selects all text in the text box.
Declaration
public void SelectAll()
SetBackColorThemeOverrides()
Declaration
protected override void SetBackColorThemeOverrides()
Overrides
SetForeColorThemeOverrides()
Declaration
protected override void SetForeColorThemeOverrides()
Overrides
Events
ContextMenuOpening
Occurs when opening the context menu.
Declaration
public event TreeBoxContextMenuOpeningEventHandler ContextMenuOpening
Event Type
TreeBoxContextMenuOpeningEventHandler
|
CreateTextBlock
Occurs when an instance of ITextBlock is created
Declaration
public event CreateTextBlockEventHandler CreateTextBlock
Event Type
CreateTextBlockEventHandler
|
IMECompositionEnded
Fired when the Input Method Editor completes the composition.
Declaration
public event EventHandler IMECompositionEnded
Event Type
System.EventHandler
|
IMECompositionResult
Fired when the Input Method Editor has a result ready. For languages like Korean this might happen before the composition has ended.
Declaration
public event EventHandler<IMECompositionResultEventArgs> IMECompositionResult
Event Type
System.EventHandler<IMECompositionResultEventArgs>
|
IMECompositionStarted
Fired when the Input Method Editor starts the composition.
Declaration
public event EventHandler IMECompositionStarted
Event Type
System.EventHandler
|
SelectionChanged
Occurs when text selection is changed.
Declaration
public event SelectionChangedEventHandler SelectionChanged
Event Type
SelectionChangedEventHandler
|
SelectionChanging
Occurs when text selection is changing.
Declaration
public event SelectionChangingEventHandler SelectionChanging
Event Type
SelectionChangingEventHandler
|
TextBlockFormatting
Occurs when text block is formatting.
Declaration
public event TextBlockFormattingEventHandler TextBlockFormatting
Event Type
TextBlockFormattingEventHandler
|
TextChanging
Occurs when the text is changing.
Declaration
public event TextChangingEventHandler TextChanging
Event Type
TextChangingEventHandler
|