ClassCommandBarTextBox
Represents a text box in CommandBarStripElement.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class CommandBarTextBox : RadCommandBarBaseItem, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadCommandBarVisualElementRadCommandBarBaseItemCommandBarTextBox
Implements:
Inherited Members
Constructors
CommandBarTextBox()
Declaration
public CommandBarTextBox()
Properties
NullText
Gets or sets the prompt text that is displayed when the text box contains no text.
NullTextColor
Gets or sets the color of prompt text that is displayed when the text box contains no text.
PasswordChar
Gets or sets the character used to mask characters of a password in a single-line text box. control.
SelectionLength
Gets or sets the number of characters selected in the text box.
Declaration
[Browsable(false)]
public int SelectionLength { get; set; }
Property Value
SelectionStart
Gets or sets the starting point of text selected in the text box.
Declaration
[Browsable(false)]
public int SelectionStart { get; set; }
Property Value
ShowClearButton
Gets or sets a value indicating whether the clear button is shown.
Text
Gets or sets the text associated with this item.
Declaration
[Bindable(true)]
[SettingsBindable(true)]
public override string Text { get; set; }
Property Value
Overrides
TextBoxElement
Gets or sets the hosted RadTextBoxElement.
Declaration
public RadTextBoxElement TextBoxElement { get; set; }
Property Value
VisibleInStrip
Indicates whether the item should be drawn in the strip.
Declaration
[Browsable(true)]
public override bool VisibleInStrip { get; set; }
Property Value
Overrides
Methods
AppendText(string)
Appends text to the current text of a text box.
Declaration
public void AppendText(string text)
Parameters
text
The text to append to the current contents of the text box.
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()
Called by the element when constructed. Allows inheritors to build the element tree.
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 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.
GetCharIndexFromPosition(Point)
Gets the index of a character at a given point
GetFirstCharIndexFromLine(int)
Retrieves the index of the first character of a given line.
GetFirstCharIndexOfCurrentLine()
Retrieves the index of the first character of the current line.
Declaration
public int GetFirstCharIndexOfCurrentLine()
Returns
The zero-based character index in the current line.
GetLineFromCharIndex(int)
Retrieves the line number from the specified character position within the text of the control.
GetPositionFromCharIndex(int)
Retrieves the location within the control at the specified character index.
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
text
The text to replace.
ScrollToCaret()
Scrolls the contents of the control to the current caret position.
Declaration
public void ScrollToCaret()
Select(int, int)
Selects a range of text in the text box.
Events
GotFocus
Occurs when the element receives focus.
Declaration
[Browsable(false)]
public event EventHandler GotFocus
Event Value
KeyDown
Occurs when the CommandBarTextBox has focus and the user presses a key down
KeyPress
Occurs when the CommandBarTextBox has focus and the user presses a key
Declaration
public event KeyPressEventHandler KeyPress
Event Value
KeyUp
Occurs when the CommandBarTextBox has focus and the user releases the pressed key up
LostFocus
Occurs when the element loses focus.
Declaration
[Browsable(false)]
public event EventHandler LostFocus
Event Value
TextChanged
Occurs when the Text property value changes.
TextChanging
Occurs when the Text property value is about to be changed.
Declaration
public event TextChangingEventHandler TextChanging
Event Value