Show Cursor instead of border on cell

Posted by: accmaster on 8 September 2017, 3:19 pm EST

  • Posted 8 September 2017, 3:19 pm EST

    Hi there,

    I am using farpoint grid and following code is used to initialize the grid.

    Fp1.Sheets(0).OperationMode = FarPoint.Win.Spread.OperationMode.Normal
    Fp1.Sheets(0).SelectionPolicy = FarPoint.Win.Spread.Model.SelectionPolicy.Single
    Fp1.FocusRenderer = New FarPoint.Win.Spread.SolidFocusIndicatorRenderer(Color.Blue, 2)
    Fp1.Sheets(0).RowHeader.Columns(0).Width = 35
    Fp1.EditModeReplace = True
    Fp1.AllowColumnMove = True
    Fp1.Font = FontFormat
    Fp1.ActiveSheet.GrayAreaBackColor = Color.White
    Fp1.AllowUserZoom = False

    At run time when i move up / down arrows cursor moves up / down on rows and it shows current cell with blue border. What i want is when users enters in cell it shows cursor on left side of current cell so that user can select the text with control+right arrow. (see attached file).

    Please help me out.


  • Marked as Answer

    Replied 8 September 2017, 3:19 pm EST

    Hi Ladak,

    In order to set the cursor to the left side of the text in a cell, you have to edit the EditModeOn event code like so:

    Private Sub FpSpread1_EditModeOn(ByVal sender As Object, ByVal e As System.EventArgs) Handles FpSpread1.EditModeOn

    Dim control As FarPoint.Win.Spread.CellType.GeneralEditor
    control = CType(FpSpread1.EditingControl, FarPoint.Win.Spread.CellType.GeneralEditor)
    control.EditModeCursorPosition = FarPoint.Win.EditModeCursorPosition.FirstInputPosition

    End Sub

    Let me know if that works for you.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels