Tab and Enter

Posted by: ginacresse on 8 September 2017, 1:08 pm EST

  • Posted 8 September 2017, 1:08 pm EST

    Hi,


    I have a Spread with 6 columns.  The first 3 are locked and TabStop = False.  The last column is hidden.  I'm using the following code to make the Enter key work just like the Tab key - move across the row to the end, then down to the next column.



    Dim im As FarPoint.Win.Spread.InputMap


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


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


    im = fpsForecast.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused)


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


    The above code moves across the row but stops at the end and does not proceed to the next row.  I tried this:



    Dim im As FarPoint.Win.Spread.InputMap


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


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


    im = fpsForecast.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused)


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


    But that moves down the column but not across the row. What am I doing wrong?


    Thanks.

  • Replied 8 September 2017, 1:08 pm EST

    Given your scenario you need to use MoveToNextColumnWrap.  Keep in mind that when it reaches the last visible column it will wrap to the next row but to the first column that does not have the TabStop set to False.
  • Replied 8 September 2017, 1:08 pm EST

    Thanks, Bob.  That did the trick.
Need extra support?

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

Learn More

Forum Channels