Поделиться через


PenInputPanel.VerticalOffset Property

PenInputPanel.VerticalOffset Property

Gets or sets the offset between the closest horizontal edge of the pen input panel and the closest horizontal edge of the control to which it is attached.

Definition

Visual Basic .NET Public Property VerticalOffset As Integer
C# public int VerticalOffset { get; set; }
Managed C++ public: __property int* get_VerticalOffset();
public: __property void set_VerticalOffset(int*);

Property Value

System.Int32. The offset between the closest horizontal edge of the pen input panel and the closest horizontal edge of the control to which it is attached.

This property is read/write. This property has no default value.

Exceptions

COMException Leave Site:
ObjectDisposedException Leave Site:

Remarks

The default value is the equivalent of 1/16 of an inch, in pixels, and is dependent on screen resolution settings. A value of 0 (zero) attaches the PenInputPanel object directly to the bottom of the control. A value of -1 places the pen input panel 1 pixel above the control.

If the new position of the PenInputPanel object causes the pen input panel to appear outside the boundary of the screen working area, the panel is shifted toward the center of the working area so that the edges of the panel are adjacent to the nearest edges of the screen.

Examples

[C#]

This C# example creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, theInkEdit. It then sets the vertical (y-axis) position of the PenInputPanel object to 100 pixels from the nearest horizontal edge of theInkEdit, by setting the VerticalOffset property.

/// Declare, create, and attach a new PenInputPanel to an InkEdit control
PenInputPanel thePenInputPanel = new PenInputPanel(theInkEdit);

// Set the vertical position of the PenInputPanel object
thePenInputPanel.VerticalOffset = 100;

[Visual Basic .NET]

This Microsoft® Visual Basic® .NET example creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, theInkEdit. It then sets the vertical (y-axis) position of the PenInputPanel object to 100 pixels from the nearest horizontal edge of theInkEdit, by setting the VerticalOffset property.

' Declare, create, and attach a new PenInputPanel to an InkEdit control
Dim thePenInputPanel As New PenInputPanel(theInkEdit)

' Set the vertical position of the PenInputPanel object
thePenInputPanel.VerticalOffset = 100

See Also