Spread Windows Forms 15.0
GrapeCity.Win.PluginInputMan Assembly / GrapeCity.Win.Spread.InputMan.CellType Namespace / GcTextBox Class / GetCharIndexFromPosition Method
The location to search


In This Topic
    GetCharIndexFromPosition Method
    In This Topic
    Retrieves the index of the character nearest to the specified location.
    Syntax
    'Declaration
     
    
    Public Overridable Function GetCharIndexFromPosition( _
       ByVal point As Point _
    ) As Integer
    'Usage
     
    
    Dim instance As GcTextBox
    Dim point As Point
    Dim value As Integer
     
    value = instance.GetCharIndexFromPosition(point)
    public virtual int GetCharIndexFromPosition( 
       Point point
    )

    Parameters

    point
    The location to search

    Return Value

    The zero-based character index at the specified location
    Remarks
    This method returns the character index that is closest to the position specified in the point parameter. The character index is a zero-based index of text in the control, including spaces. You can use this method to determine where in the text the user has the mouse by passing the mouse coordinates to this method. This can be useful if you want to perform tasks when the user hovers the mouse pointer over a word in the text of the control.
    See Also