TextInputPanel.TextInserting (Evento)
Actualización: noviembre 2007
Se produce cuando el Panel de entrada de Tablet PC está a punto de insertar 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 TextInserting As EventHandler(Of TextInsertionEventArgs)
'Uso
Dim instance As TextInputPanel
Dim handler As EventHandler(Of TextInsertionEventArgs)
AddHandler instance.TextInserting, handler
public event EventHandler<TextInsertionEventArgs> TextInserting
public:
event EventHandler<TextInsertionEventArgs^>^ TextInserting {
void add (EventHandler<TextInsertionEventArgs^>^ value);
void remove (EventHandler<TextInsertionEventArgs^>^ value);
}
/** @event */
public void add_TextInserting (EventHandler<TextInsertionEventArgs> value)
/** @event */
public void remove_TextInserting (EventHandler<TextInsertionEventArgs> value)
JScript no admite eventos.
Ejemplos
En los siguientes dos ejemplos se muestra cómo usar TextInserting.
En el primer ejemplo se asocia un controlador de eventos TextInserting, tip_TextInserting, al objeto TextInputPanel, tip.
AddHandler tip.TextInserting, AddressOf tip_TextInserting
tip.TextInserting += new EventHandler<TextInsertionEventArgs>(tip_TextInserting);
En el segundo ejemplo se define un controlador del evento TextInserting donde los valores de cadena que representan los objetos superiores RecognitionResult de las colecciones Strokes contenidas en una matriz de Ink que representa la inserción de texto del Panel de entrada se usan para establecer la propiedad TextBox.Text de un control TextBox, outputTextBox.
Sub tip_TextInserting(ByVal sender As Object, ByVal e As TextInsertionEventArgs)
outputTextBox.Text += "Inserting 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_TextInserting(object sender, TextInsertionEventArgs e)
{
outputTextBox.Text += "Inserting 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