Share via


PenInputPanel.Left (Propiedad)

Actualización: noviembre 2007

Obsoleto. Obtiene en coordenadas de pantalla el eje horizontal o eje X, que se encuentra en el borde izquierdo del objeto PenInputPanel. PenInputPanel se ha reemplazado por Microsoft.Ink.TextInput.

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

Sintaxis

'Declaración
Public ReadOnly Property Left As Integer
'Uso
Dim instance As PenInputPanel
Dim value As Integer

value = instance.Left
public int Left { get; }
public:
property int Left {
    int get ();
}
/** @property */
public int get_Left()
public function get Left () : int

Valor de propiedad

Tipo: System.Int32
Eje horizontal o eje X, posición del borde izquierdo del objeto PenInputPanel, en coordenadas de pantalla.

Comentarios

Para invalidar explícitamente el comportamiento de posicionamiento automático del objeto PenInputPanel, use las propiedades Left y Top del objeto para determinar la posición actual del panel de entrada manuscrita.

Para invalidar el comportamiento de posicionamiento automático del objeto PenInputPanel, también puede escuchar a las propiedades Left y Top del objeto PenInputPanelMovingEventArgs durante un evento PanelMoving.

ms571981.alert_security(es-es,VS.90).gifNota de seguridad:

Si se usa en entornos de confianza parcial, esta propiedad necesita el permiso SecurityPermissionFlag.AllFlags, además de los permisos que requiere PenInputPanel. Vea Security and Trust para obtener más información.

Ejemplos

En este ejemplo de C# se crea un objeto PenInputPanel, thePenInputPanel, y se asocia a un control InkEdit, theInkEdit. A continuación, asocia un controlador de eventos VisibleChanged, VisibleChanged_Event. El controlador de eventos usa la propiedad Left para agregar una frase al contenido de theInkEdit, indicando dónde se encuentra el borde izquierdo del objeto PenInputPanel, en coordenadas de la pantalla.

[C#]

//...

// Declare the PenInputPanel object
PenInputPanel thePenInputPanel;

public Form1()
{
    // Required for Windows Form Designer support
    InitializeComponent();

    // Create and attach the new PenInputPanel to an InkEdit control.
    thePenInputPanel = new PenInputPanel(theInkEdit);

    // Add a VisibleChanged event handler
    thePenInputPanel.VisibleChanged +=
        new PenInputPanelVisibleChangedEventHandler(VisibleChanged_Event);
}

//...

public void VisibleChanged_Event(object sender,
                                 PenInputPanelVisibleChangedEventArgs e)
{
    // Make sure the object that generated
    // the event is a PenInputPanel object
    if (sender is PenInputPanel)
    {
        PenInputPanel theSenderPanel = (PenInputPanel)sender;

        // When the panel has become visible...
        if (e.NewVisibility)
        {
            // Display the left edge of the
            // panel in the attached edit control
            theSenderPanel.AttachedEditControl.Text +=
                    "The left edge of the panel is at ";
            theSenderPanel.AttachedEditControl.Text += theSenderPanel.Left.ToString();
            theSenderPanel.AttachedEditControl.Text += " pixels.\n";
        }
    }
}

En este ejemplo de Microsoft® Visual Basic® .NET se crea un objeto PenInputPanel, thePenInputPanel, y se asocia a un control InkEdit, theInkEdit. A continuación, asocia un controlador de eventos VisibleChanged, VisibleChanged_Event. El controlador de eventos usa la propiedad Left para agregar una frase al contenido de theInkEdit, indicando dónde se encuentra el borde izquierdo del objeto PenInputPanel, en coordenadas de la pantalla.

[Visual Basic]

'...

' Declare the PenInputPanel object
Dim thePenInputPanel As PenInputPanel

Public Sub New()
    MyBase.New()

    ' Required for Windows Form Designer support
    InitializeComponent()

    ' Create and attach the new PenInputPanel to an InkEdit control.
    thePenInputPanel = New PenInputPanel(theInkEdit)

    ' Add a VisibleChanged event handler
    AddHandler thePenInputPanel.VisibleChanged, _
               AddressOf VisibleChanged_Event
End Sub 'New

'...

Public Sub VisibleChanged_Event(sender As Object, e As _
                                PenInputPanelVisibleChangedEventArgs)
    ' Make sure the object that generated
    ' the event is a PenInputPanel object
    If TypeOf sender Is PenInputPanel Then
       Dim theSenderPanel As PenInputPanel = CType(sender, PenInputPanel)

       ' When the panel has become visible...
       If e.NewVisibility Then
           ' Display the left edge of the
           ' panel in the attached edit control
           theSenderPanel.AttachedEditControl.Text += _
                    "The left edge of the panel is at "
          theSenderPanel.AttachedEditControl.Text += _
                   theSenderPanel.Left.ToString()
          theSenderPanel.AttachedEditControl.Text += _
                   " pixels." + ControlChars.Lf
       End If
    End If
End Sub 'VisibleChanged_Event

Plataformas

Windows Vista

.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

PenInputPanel (Clase)

PenInputPanel (Miembros)

Microsoft.Ink (Espacio de nombres)

PenInputPanel.Top