Class RadTextBoxItem
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[ComVisible(false)]
public class RadTextBoxItem : RadHostItem, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode
Constructors
RadTextBoxItem()
Initializes a new instance of
Declaration
public RadTextBoxItem()
RadTextBoxItem(Control)
Initializes a new instance of
Declaration
public RadTextBoxItem(Control hostedControl)
Parameters
System.Windows.Forms.Control
hostedControl
|
Fields
IsNullTextProperty
MultilineEvent
NullTextColorProperty
NullTextProperty
RadTextBoxItemLastStateKey
This constant is used internally.
Declaration
protected const long RadTextBoxItemLastStateKey = 140737488355328L
Field Value
System.Int64
|
Properties
AcceptsReturn
Gets or sets whether the text box accepts the return key
Declaration
[RadDefaultValue("AcceptsReturn", typeof(TextBox))]
public bool AcceptsReturn { get; set; }
Property Value
System.Boolean
|
AcceptsTab
Gets or sets whether the text box accepts the tab key
Declaration
[RadDefaultValue("AcceptsTab", typeof(TextBox))]
public bool AcceptsTab { get; set; }
Property Value
System.Boolean
|
CanUndo
Gets if the text box could undo its value
Declaration
public bool CanUndo { get; }
Property Value
System.Boolean
|
CharacterCasing
Indicates if all characters should be left alone or converted to upper or lower case
Declaration
public CharacterCasing CharacterCasing { get; set; }
Property Value
System.Windows.Forms.CharacterCasing
|
HideSelection
Gets or sets the selection in the text box
Declaration
[RadDefaultValue("HideSelection", typeof(TextBox))]
public bool HideSelection { get; set; }
Property Value
System.Boolean
|
Lines
The lines of the text in a multi-line edit, as an array of string values
Declaration
public string[] Lines { get; set; }
Property Value
System.String[]
|
MaxLength
Specifies the maximum length of characters which could be entered
Declaration
[RadDefaultValue("MaxLength", typeof(TextBox))]
public int MaxLength { get; set; }
Property Value
System.Int32
|
Modified
Indicates the visibility level of the object
Declaration
public bool Modified { get; set; }
Property Value
System.Boolean
|
Multiline
The text could span more than a line when the value is true
Declaration
[RadDefaultValue("Multiline", typeof(HostedTextBoxBase))]
public bool Multiline { get; set; }
Property Value
System.Boolean
|
NullText
Gets or sets the prompt text that is displayed when the TextBox contains no text
Declaration
[RadPropertyDefaultValue("NullText", typeof(RadTextBoxItem))]
public string NullText { get; set; }
Property Value
System.String
|
NullTextColor
Gets or sets the color of prompt text that is displayed when the TextBox contains no text
Declaration
[RadPropertyDefaultValue("NullTextColor", typeof(RadTextBoxItem))]
public Color NullTextColor { get; set; }
Property Value
System.Drawing.Color
|
PasswordChar
Gets or sets the char used for entering passwords
Declaration
[RadDefaultValue("PasswordChar", typeof(TextBox))]
public char PasswordChar { get; set; }
Property Value
System.Char
|
PreferedHeght
Gets the preferred height
Declaration
public int PreferedHeght { get; }
Property Value
System.Int32
|
ReadOnly
Indicates whether the text could be changed or not
Declaration
[RadDefaultValue("ReadOnly", typeof(TextBox))]
public bool ReadOnly { get; set; }
Property Value
System.Boolean
|
ScrollBars
The scrollbars which will appear if the editing control is in multiline mode
Declaration
public ScrollBars ScrollBars { get; set; }
Property Value
System.Windows.Forms.ScrollBars
|
SelectedText
the text which is in selection
Declaration
public string SelectedText { get; set; }
Property Value
System.String
|
SelectionLength
the length of the selection
Declaration
public virtual int SelectionLength { get; set; }
Property Value
System.Int32
|
SelectionStart
Gets or sets the start selection position
Declaration
public virtual int SelectionStart { get; set; }
Property Value
System.Int32
|
ShortcutsEnabled
Indicates whether the shortcuts are enabled. http://msdn.microsoft.com/en-us/library/system.windows.forms.textboxbase.shortcutsenabled.aspx
Declaration
[RadDefaultValue("ShortcutsEnabled", typeof(TextBox))]
public bool ShortcutsEnabled { get; set; }
Property Value
System.Boolean
|
ShouldTextChangedFire
This property is used internally.
Declaration
public bool ShouldTextChangedFire { get; set; }
Property Value
System.Boolean
|
StretchVertically
Gets or sets the vertical stretch value
Declaration
public override bool StretchVertically { get; set; }
Property Value
System.Boolean
|
Overrides
TabStop
Gets or sets whether the control can receives the focus when tab is pressed
Declaration
public bool TabStop { get; set; }
Property Value
System.Boolean
|
Text
Gets or sets the text associated with this item.
Declaration
public override string Text { get; set; }
Property Value
System.String
|
Overrides
TextAlign
Gets or sets the alignment of the text in the editing control
Declaration
public HorizontalAlignment TextAlign { get; set; }
Property Value
System.Windows.Forms.HorizontalAlignment
|
TextBoxControl
Gets the TextBox control hosted in this item.
Declaration
public HostedTextBoxBase TextBoxControl { get; }
Property Value
HostedTextBoxBase
|
TextLength
Indicates the text length
Declaration
public int TextLength { get; }
Property Value
System.Int32
|
UseGenericBorderPaint
Gets or sets a value indicating whether to show the bottom part of characters, clipped due to font name or size particularities
Declaration
[RadDescription("UseGenericBorderPaint", typeof(HostedTextBoxBase))]
[RadDefaultValue("UseGenericBorderPaint", typeof(HostedTextBoxBase))]
public bool UseGenericBorderPaint { get; set; }
Property Value
System.Boolean
|
VsbVisible
Determines whether the element may be added associated with metadata in the Visual Style Builder.
Declaration
public override bool VsbVisible { get; }
Property Value
System.Boolean
|
Overrides
WordWrap
Indicates if lines are automatically word-wrapped for multiline editing controls
Declaration
[RadDefaultValue("WordWrap", typeof(TextBox))]
public bool WordWrap { get; set; }
Property Value
System.Boolean
|
Methods
AppendText(String)
Appends the given text
Declaration
public void AppendText(string text)
Parameters
System.String
text
|
Clear()
Clears the editing control's text
Declaration
public void Clear()
ClearUndo()
Clears and undoes the text
Declaration
public void ClearUndo()
Copy()
Copies the selected text
Declaration
public void Copy()
Cut()
Cuts the selected text
Declaration
public void Cut()
DeselectAll()
clears the selection
Declaration
public void DeselectAll()
GetCharFromPosition(Point)
Gets a character from a given point
Declaration
public char GetCharFromPosition(Point point)
Parameters
System.Drawing.Point
point
|
Returns
System.Char
|
GetCharIndexFromPosition(Point)
Gets the index of a character at a given point
Declaration
public int GetCharIndexFromPosition(Point point)
Parameters
System.Drawing.Point
point
|
Returns
System.Int32
|
GetFirstCharIndexFromLine(Int32)
gets the index of the first char in a given line
Declaration
public int GetFirstCharIndexFromLine(int lineNumber)
Parameters
System.Int32
lineNumber
|
Returns
System.Int32
|
GetFirstCharIndexOfCurrentLine()
gets the first char index at the current line
Declaration
public int GetFirstCharIndexOfCurrentLine()
Returns
System.Int32
|
GetLineFromCharIndex(Int32)
Gets a line number from a char index
Declaration
public int GetLineFromCharIndex(int index)
Parameters
System.Int32
index
|
Returns
System.Int32
|
GetPositionFromCharIndex(Int32)
Gets the position from a char index
Declaration
public Point GetPositionFromCharIndex(int index)
Parameters
System.Int32
index
|
Returns
System.Drawing.Point
|
InitializeFields()
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
|
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
|
OnPreviewKeyDown(PreviewKeyDownEventArgs)
Raises the PreviewKeyDown event.
Declaration
protected virtual void OnPreviewKeyDown(PreviewKeyDownEventArgs e)
Parameters
System.Windows.Forms.PreviewKeyDownEventArgs
e
|
OnPropertyChanged(RadPropertyChangedEventArgs)
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
RadPropertyChangedEventArgs
e
|
Overrides
OnReadOnlyChanged(EventArgs)
Raises the ReadOnlyChanged event.
Declaration
protected virtual void OnReadOnlyChanged(EventArgs e)
Parameters
System.EventArgs
e
|
OnTabStopChanged(EventArgs)
Declaration
protected virtual void OnTabStopChanged(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)
Declaration
protected override void OnTextChanging(TextChangingEventArgs e)
Parameters
TextChangingEventArgs
e
|
Overrides
OnTunnelEvent(RadElement, RoutedEventArgs)
Declaration
protected override void OnTunnelEvent(RadElement sender, RoutedEventArgs args)
Parameters
RadElement
sender
|
RoutedEventArgs
args
|
Overrides
Paste()
pastes the text in the clipboard
Declaration
public void Paste()
Paste(String)
Pasted a given text
Declaration
public void Paste(string text)
Parameters
System.String
text
|
ScrollToCaret()
scrolls the textbox to the caret position
Declaration
public void ScrollToCaret()
Select(Int32, Int32)
Makes a selection in a given range specified by a start position and selection length
Declaration
public void Select(int start, int length)
Parameters
System.Int32
start
|
System.Int32
length
|
SelectAll()
Selects all text in the control.
Declaration
public void SelectAll()
TextBoxControl_AcceptsTabChanged(Object, EventArgs)
Declaration
protected void TextBoxControl_AcceptsTabChanged(object sender, EventArgs e)
Parameters
System.Object
sender
|
System.EventArgs
e
|
TextBoxControl_HideSelectionChanged(Object, EventArgs)
Declaration
protected void TextBoxControl_HideSelectionChanged(object sender, EventArgs e)
Parameters
System.Object
sender
|
System.EventArgs
e
|
TextBoxControl_ModifiedChanged(Object, EventArgs)
Declaration
protected void TextBoxControl_ModifiedChanged(object sender, EventArgs e)
Parameters
System.Object
sender
|
System.EventArgs
e
|
TextBoxControl_MultilineChanged(Object, EventArgs)
Declaration
protected void TextBoxControl_MultilineChanged(object sender, EventArgs e)
Parameters
System.Object
sender
|
System.EventArgs
e
|
TextBoxControl_ReadOnlyChanged(Object, EventArgs)
Declaration
protected void TextBoxControl_ReadOnlyChanged(object sender, EventArgs e)
Parameters
System.Object
sender
|
System.EventArgs
e
|
TextBoxControl_TextAlignChanged(Object, EventArgs)
Declaration
protected void TextBoxControl_TextAlignChanged(object sender, EventArgs e)
Parameters
System.Object
sender
|
System.EventArgs
e
|
TextBoxControl_TextChanged(Object, EventArgs)
Declaration
protected void TextBoxControl_TextChanged(object sender, EventArgs e)
Parameters
System.Object
sender
|
System.EventArgs
e
|
Undo()
Undoes the last edit operation in the text box.
Declaration
public void Undo()
Events
AcceptsTabChanged
Occurs when the AcceptsTab property has changed.
Declaration
public event EventHandler AcceptsTabChanged
Event Type
System.EventHandler
|
HideSelectionChanged
Occurs when the HideSelection property has changed.
Declaration
public event EventHandler HideSelectionChanged
Event Type
System.EventHandler
|
ModifiedChanged
Occurs when the Modified property has changed.
Declaration
public event EventHandler ModifiedChanged
Event Type
System.EventHandler
|
MultilineChanged
Occurs when the Multiline property has changed.
Declaration
public event EventHandler MultilineChanged
Event Type
System.EventHandler
|
PreviewKeyDown
Occurs when a key is pressed while focus is on text box.
Declaration
public event PreviewKeyDownEventHandler PreviewKeyDown
Event Type
System.Windows.Forms.PreviewKeyDownEventHandler
|
ReadOnlyChanged
Occurs when the ReadOnly property has changed.
Declaration
public event EventHandler ReadOnlyChanged
Event Type
System.EventHandler
|
TabStopChanged
Occurs when the TabStop property has changed.
Declaration
public event EventHandler TabStopChanged
Event Type
System.EventHandler
|
TextAlignChanged
Occurs when the TextAlign property has changed.
Declaration
public event EventHandler TextAlignChanged
Event Type
System.EventHandler
|