Share via


PenInputPanel.HorizontalOffset Property

Deprecated. 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. PenInputPanel has been replaced by Microsoft.Ink.TextInput.

Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)

Syntax

'Declaration
Public Property HorizontalOffset As Integer
'Usage
Dim instance As PenInputPanel
Dim value As Integer

value = instance.HorizontalOffset

instance.HorizontalOffset = value
public int HorizontalOffset { get; set; }
public:
property int HorizontalOffset {
    int get ();
    void set (int value);
}
/** @property */
public int get_HorizontalOffset ()

/** @property */
public void set_HorizontalOffset (int value)
public function get HorizontalOffset () : int

public function set HorizontalOffset (value : int)
Not applicable.

Property Value

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

Value

Meaning

24

The number of pixels equal to 0.25 inches at 96 dots per inch (dpi).

30

The number of pixels equal to 0.25 inches at 120 dpi.

33

The number of pixels equal to 0.25 inches at 133 dpi.

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, plus or minus the default offset value.

Security noteSecurity Note:

If using under partial trust, this property requires SecurityPermissionFlag.AllFlags permission, in addition to the permissions required by PenInputPanel. See Security and Trust for more information.

Example

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.

[C#]

// 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;

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.

[Visual Basic]

' 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

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

PenInputPanel Class
PenInputPanel Members
Microsoft.Ink Namespace
PenInputPanel.VerticalOffset