Compartir a través de


TextInputPanel.TextInserted (Evento)

Actualización: noviembre 2007

Se produce cuando el Panel de entrada de Tablet PC ha insertado texto en el control con el foco de entrada.

Espacio de nombres:  Microsoft.Ink.TextInput
Ensamblado:  Microsoft.Ink (en Microsoft.Ink.dll)

Sintaxis

'Declaración
Public Event TextInserted As EventHandler(Of TextInsertionEventArgs)
'Uso
Dim instance As TextInputPanel
Dim handler As EventHandler(Of TextInsertionEventArgs)

AddHandler instance.TextInserted, handler
public event EventHandler<TextInsertionEventArgs> TextInserted
public:
 event EventHandler<TextInsertionEventArgs^>^ TextInserted {
    void add (EventHandler<TextInsertionEventArgs^>^ value);
    void remove (EventHandler<TextInsertionEventArgs^>^ value);
}
/** @event */
public void add_TextInserted (EventHandler<TextInsertionEventArgs> value)
/** @event */
public void remove_TextInserted (EventHandler<TextInsertionEventArgs> value)
JScript no admite eventos.

Ejemplos

En los siguientes dos ejemplos se muestra cómo usar TextInserted.

En el primer ejemplo se asocia un controlador de eventos TextInserted, tip_TextInserted, al objeto TextInputPanel, tip.

AddHandler tip.TextInserted, AddressOf tip_TextInserted
tip.TextInserted += new EventHandler<TextInsertionEventArgs>(tip_TextInserted);

En el segundo ejemplo se define un controlador del evento TextInserted donde se usa un valor de cadena para establecer propiedad TextBox.Text de un control TextBox, outputTextBox.

Sub tip_TextInserted(ByVal sender As Object, ByVal e As TextInsertionEventArgs)
    outputTextBox.Text += "Inserted Text: " + Environment.NewLine
    Dim inkArray As Microsoft.Ink.Ink() = e.GetInk()
    Dim ink As Microsoft.Ink.Ink
    For Each ink In inkArray
        outputTextBox.Text += ink.Strokes.ToString()
    Next ink
    outputTextBox.Text += Environment.NewLine
End Sub
void tip_TextInserted(object sender, TextInsertionEventArgs e)
{
    outputTextBox.Text += "Inserted Text: " + Environment.NewLine;
    Microsoft.Ink.Ink[] inkArray = e.GetInk();
    foreach (Microsoft.Ink.Ink ink in inkArray)
    {
        outputTextBox.Text += ink.Strokes.ToString();
    }
    outputTextBox.Text += Environment.NewLine;
}

Plataformas

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework y .NET Compact Framework no admiten todas las versiones de cada plataforma. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.

Información de versión

.NET Framework

Compatible con: 3.0

Vea también

Referencia

TextInputPanel (Clase)

TextInputPanel (Miembros)

Microsoft.Ink.TextInput (Espacio de nombres)