Partager via


IXRTextBox (Windows Embedded CE 6.0)

1/6/2010

This class represents a control that can be used to display single-format, multiline text.

Syntax

class IXRTextBox : public IXRControl

Methods

Method Description

IXRTextBox::AddSelectionChangedEventHandler

Attaches a delegate to the SelectionChanged event for this text box. When the SelectionChanged event is raised by this text box, this delegate will be invoked.

IXRTextBox::AddTextChangedEventHandler

Attaches a delegate to the TextChanged event for this text box. When the TextChanged event is raised by this text box, this delegate is invoked.

IXRTextBox::GetAcceptsReturn

Retrieves a value that determines whether this text box allows for and displays the new-line character or return character. These characters are used to divide text into multiple lines.

IXRTextBox::GetHorizontalScrollBarVisibility

Retrieves the visibility of the horizontal scroll bar.

IXRTextBox::GetIsReadOnly

Retrieves a value that determines whether the user can change the text in this text box.

IXRTextBox::GetMaxLength

Retrieves the value that determines the maximum number of characters allowed for user input.

IXRTextBox::GetSelectedText

Retrieves the content of the current selection in this text box.

IXRTextBox::GetSelectionBackground

Retrieves the Brush that fills the background of the selected text in this text box.

IXRTextBox::GetSelectionForeground

Retrieves the Brush used for the selected text in this text box.

IXRTextBox::GetSelectionStart

Retrieves the starting position of the text selected in this text box.

IXRTextBox::GetSelectionLength

Retrieves the number of characters in the current selection in this text box.

IXRTextBox::GetText

Retrieves the text contents of this text box.

IXRTextBox::GetTextAlignment

Retrieves a value that indicates the horizontal alignment of text inside this text box.

IXRTextBox::GetTextWrapping

Retrieves how line breaking occurs if a line of text extends beyond the available width of this text box.

IXRTextBox::GetVerticalScrollBarVisibility

Retrieves the visibility of the vertical scroll bar.

IXRTextBox::RemoveSelectionChangedEventHandler

Removes a delegate from the SelectionChanged event for this text-box control.

IXRTextBox::RemoveTextChangedEventHandler

Removes a delegate from the TextChanged event for this text-box control.

IXRTextBox::Select

Selects a range of text in this text box.

IXRTextBox::SelectAll

Selects all the contents of this text box.

IXRTextBox::SetAcceptsReturn

Sets a value that determines whether this text box allows for and displays the new-line character or return character. These characters are used to divide text into multiple lines.

IXRTextBox::SetHorizontalScrollBarVisibility

Sets the visibility of the horizontal scroll bar.

IXRTextBox::SetIsReadOnly

Retrieves a value that determines whether the user can change the text in this text box.

IXRTextBox::SetMaxLength

Sets the value that determines the maximum number of characters allowed for user input.

IXRTextBox::SetSelectedText

Sets the content of the current selection in this text box.

IXRTextBox::SetSelectionBackground

Sets the Brush that fills the background of the selected text in this text box.

IXRTextBox::SetSelectionForeground

Sets the Brush used for the selected text in this text box.

IXRTextBox::SetSelectionLength

Sets the number of characters in the current selection in this text box.

IXRTextBox::SetSelectionStart

Sets the starting position of the text selected in this text box.

IXRTextBox::SetText

Sets the text contents of this text box.

IXRTextBox::SetTextAlignment

Sets a value that indicates the horizontal alignment of text inside this text box.

IXRTextBox::SetTextWrapping

Sets how line breaking occurs if a line of text extends beyond the available width of this text box.

IXRTextBox::SetVerticalScrollBarVisibility

Sets the visibility of the vertical scroll bar.

Remarks

You can enable multiline text in a text-box control by using IXRTextBox::SetAcceptsReturn.

You might want to use a text box to display text. However, you might not want users to be able to edit its text. To prevent users from editing its text, you can call IXRTextBox::SetIsReadOnly. If you pass in true to this method, edit commands will not be supported, and the KeyUp and KeyDown events are specified as handled. If you must have formatted text that cannot be edited by the user, use the IXRTextBlock class instead. If you must have an editable text box that accepts passwords or other input, use the IXRPasswordBox class instead.

You can modify the border of a text box by using the inherited methods IXRControl::SetBorderThickness and IXRControl::SetBorderBrush.

You can also define a text-box control in Microsoft Silverlight 2 XAML. For information about the differences between XAML in Silverlight for Windows Embedded and Silverlight 2, see Differences Between Silverlight for the Web and Silverlight for Windows Embedded. For more information about how to define this element in the source XAML for your application, see this Microsoft Web site.

Inheritance Hierarchy

IXRDependencyObject

    IXRUIElement

        IXRFrameworkElement

            IXRControl

                IXRTextBox

.NET Framework Equivalent

System.Windows.Controls.TextBox

Requirements

Header XamlRuntime.h
sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

Classes for UI Element Management