Compartir a través de


PenInputPanel.HorizontalOffset Property

PenInputPanel.HorizontalOffset Property

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

Definition

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

Property Value

System.Int32. The offset between the left edge of the pen input panel and the left 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 0.25 inches in pixels and is dependent on screen resolution settings. A negative value indicates a shift to the left of the control. A positive value indicates a shift to the right. A zero value indicates that the left edge of the pen input panel is positioned exactly at the left edge of the control.

If the new position causes the 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 horizontal (x-axis) position of thePenInputPanel to 100 pixels to the right of theInkEdit control's left edge, by using the HorizontalOffset property.

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

// Set the horizontal position of the pen input panel
thePenInputPanel.HorizontalOffset = 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 horizontal (x-axis) position of thePenInputPanel to 100 pixels to the right of theInkEdit control's left edge, by using the HorizontalOffset property.

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

' Set the horizontal position of the pen input panel
thePenInputPanel.HorizontalOffset = 100

See Also