Change cell focus during formula editing.

Posted by: adonescunha on 8 September 2017, 1:32 pm EST

  • Posted 8 September 2017, 1:32 pm EST

    When I'm editing a cell formula and type tab or enter the focus doesn't moves to the right or the cell beneath. I'd like to make the cell commits and lose the focus when I press tab or enter. Is there a way to accomplish this?

    I tried implement the KeyDown event handler but it doesn't trigger when I press the tab key. 

  • Replied 8 September 2017, 1:32 pm EST

    Hello,


    The Key events of the Spread will not fire when you are in editmode. In this case, the editor is getting the Key events. However, the Tab key should automatically take the cell out of editmode and move you to the next cell. In order to get the behavior of the enter key to move down to the next row of the column, you need to set this up in the InputMap of Spread.


    Dim im As FarPoint.Win.Spread.InputMap


    Dim im2 As FarPoint.Win.Spread.InputMap


    im = FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused)


    im2 = FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused)


    im.Put(New FarPoint.Win.Spread.Keystroke(Keys.Enter, Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextRow)


    im2.Put(New FarPoint.Win.Spread.Keystroke(Keys.Enter, Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextRow)

Need extra support?

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

Learn More

Forum Channels