SftMask/OCX 6.5

SftMask.GetInsertPosition Method

Softel vdm, Inc.

Calculates the caret location for insertion.

Syntax       

VB.NET

ClosestPos = object.GetInsertPosition(ByVal Pos As Integer, ByVal GoingRight As Boolean)  As Integer

VB

ClosestPos = object.GetInsertPosition(ByVal Pos As Long, ByVal GoingRight As Boolean)  As Long

C#.NET

int ClosestPos = object.GetInsertPosition(int Pos, bool GoingRight);

VC++

long ClosestPos = object->GetInsertPosition(long Pos, VARIANT_BOOL GoingRight);

C

HRESULT object->raw_GetInsertPosition(long Pos, VARIANT_BOOL GoingRight, long* ClosestPos);

Delphi

ClosestPos := object.GetInsertPosition(Pos : Integer; GoingRight : WordBool)   : Integer;

object

A SftMask object.

Pos

The index of the character whose nearest valid insertion position is to be determined.

GoingRight

Set to True to locate the nearest valid position moving towards the end of the control contents, otherwise set to False to locate the nearest valid position moving towards the beginning of the control contents

ClosestPos

Returns the nearest character index suitable for insertion.

Comments

The GetInsertPosition method calculates the caret location for insertion.

This method is automatically used during OLE drag & drop processing and is only needed if an application implements its own drag & drop processing.


Feedback / comments / error reports for this topic
© 2000, 2008 - Softel vdm, Inc. - www.softelvdm.com