Class CommandBarTextBox
Represents a text box in CommandBarStripElement.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class CommandBarTextBox : RadCommandBarBaseItem, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
CommandBarTextBox()
Declaration
public CommandBarTextBox()
Properties
NullText
Gets or sets the prompt text that is displayed when the text box 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 text box contains no text.
Declaration
[RadPropertyDefaultValue("NullTextColor", typeof(RadTextBoxItem))]
public Color NullTextColor { get; set; }
Property Value
|
System.Drawing.Color
|
PasswordChar
Gets or sets the character used to mask characters of a password in a single-line text box. control.
Declaration
public char PasswordChar { get; set; }
Property Value
|
System.Char
|
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
|
ShowClearButton
Gets or sets a value indicating whether the clear button is shown.
Declaration
public bool ShowClearButton { 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
TextBoxElement
Gets or sets the hosted RadTextBoxElement.
Declaration
public RadTextBoxElement TextBoxElement { get; set; }
Property Value
|
RadTextBoxElement
|
VisibleInStrip
Indicates whether the item should be drawn in the strip.
Declaration
public override bool VisibleInStrip { get; set; }
Property Value
|
System.Boolean
|
Overrides
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 to append to the current contents of the text box. |
Clear()
Clears all text from the text box control.
Declaration
public void Clear()
ClearUndo()
Clears information about the most recent operation from the undo buffer of the text box.
Declaration
public void ClearUndo()
Copy()
Copies the current selection in the text box to the Clipboard.
Declaration
public void Copy()
CreateChildElements()
Declaration
protected override void CreateChildElements()
Overrides
Cut()
Moves the current selection in the text box to the Clipboard.
Declaration
public void Cut()
DeselectAll()
Specifies that the value of the System.Windows.Forms.TextBoxBase.SelectionLength property is zero so that no characters are selected in the control.
Declaration
public void DeselectAll()
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
The location from which to seek the nearest character. |
Returns
|
System.Char
The character at the specified location. |
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)
Retrieves the index of the first character of a given line.
Declaration
public int GetFirstCharIndexFromLine(int lineNumber)
Parameters
|
System.Int32
lineNumber
The line for which to get the index of its first character. |
Returns
|
System.Int32
The zero-based index of the first character in the specified line. |
GetFirstCharIndexOfCurrentLine()
Retrieves the index of the first character of the current line.
Declaration
public int GetFirstCharIndexOfCurrentLine()
Returns
|
System.Int32
The zero-based character index in the current line. |
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
The character index position to search. |
Returns
|
System.Int32
The zero-based line number in which the character index is located. |
GetPositionFromCharIndex(Int32)
Retrieves the location within the control at the specified character index.
Declaration
public Point GetPositionFromCharIndex(int index)
Parameters
|
System.Int32
index
The index of the character for which to retrieve the location. |
Returns
|
System.Drawing.Point
The location of the specified character within the client rectangle of the control. |
Paste()
Replaces the current selection in the text box with the contents of the Clipboard.
Declaration
public void Paste()
Paste(String)
Sets the selected text to the specified text without clearing the undo buffer.
Declaration
public void Paste(string text)
Parameters
|
System.String
text
The text to replace. |
ScrollToCaret()
Scrolls the contents of the control to the current caret position.
Declaration
public void ScrollToCaret()
Select()
Activates the hosted text box control.
Declaration
public void Select()
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 position of the first character in the current text selection within the text box. |
|
System.Int32
length
The number of characters to select. |
SelectAll()
Selects all text in the text box.
Declaration
public void SelectAll()
Events
GotFocus
Occurs when the element receives focus.
Declaration
public event EventHandler GotFocus
Event Type
|
System.EventHandler
|
KeyDown
Occurs when the CommandBarTextBox has focus and the user presses a key down
Declaration
public event KeyEventHandler KeyDown
Event Type
|
System.Windows.Forms.KeyEventHandler
|
KeyPress
Occurs when the CommandBarTextBox has focus and the user presses a key
Declaration
public event KeyPressEventHandler KeyPress
Event Type
|
System.Windows.Forms.KeyPressEventHandler
|
KeyUp
Occurs when the CommandBarTextBox has focus and the user releases the pressed key up
Declaration
public event KeyEventHandler KeyUp
Event Type
|
System.Windows.Forms.KeyEventHandler
|
LostFocus
Occurs when the element loses focus.
Declaration
public event EventHandler LostFocus
Event Type
|
System.EventHandler
|
TextChanged
Occurs when the Text property value changes.
Declaration
public event EventHandler TextChanged
Event Type
|
System.EventHandler
|
TextChanging
Occurs when the Text property value is about to be changed.
Declaration
public event TextChangingEventHandler TextChanging
Event Type
|
TextChangingEventHandler
|