Tabbing through controls

Posted by: smiley-fp on 8 September 2017, 1:32 pm EST

  • Posted 8 September 2017, 1:32 pm EST

    Hi,

    I have my spread sheet cells locked and operation mode set to row mode. What I would like to do is have the use be able to tab to the spread sheet in the tab order, but when tab is pressed again it go to the next tab index instead of tabbing through the cells. In other words, can I turn off tabbing in the spread sheet and make it go on to the next tab index?

     I also have another quick question. When operation mode is set to row, the row is highlighted, but the selected cell is not (it is white). Is there a property that allows the entire row to be highlighted?

     

    -Justin

  • Replied 8 September 2017, 1:32 pm EST

    Justin,


    You can turn off the Spread processing of the Tab key by using the InputMap. If you want to be able to select an entire row and not be able to edit the Spread, it would be best to set OperationMode to SingleSelect. This will give you the behavior you are looking, and you would not need to lock the cells.


    Dim im As FarPoint.Win.Spread.InputMap


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


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


    im.Put(New FarPoint.Win.Spread.Keystroke(Keys.Tab, Keys.Shift), FarPoint.Win.Spread.SpreadActions.None)


    FpSpread1.Sheets(0).OperationMode = FarPoint.Win.Spread.OperationMode.SingleSelect

  • Replied 8 September 2017, 1:32 pm EST

    Justin -

    You would have to change the default Key mapping for the Tab key...

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

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

    There is not a property to do the second part of your question.  You would have to set the back color of the ActiveCell.

  • Replied 8 September 2017, 1:32 pm EST

    Thanks guys, that did it!

     -Justin

  • Replied 8 September 2017, 1:32 pm EST

    Okay, after this change, I broke some functionally. I usually use the LeaveCell method, which has worked great. When I have the operation mode set to SingleSelect, the LeaveCell method is only called when a user uses the mouse to change rows, and not the arrows as it does with row mode. Is there a differnt method that can be used with the SingleSelect operation mode to determin if the row has changed with the arrows?

     -Justin

  • Replied 8 September 2017, 1:32 pm EST

    Justin,


    With the OperationMode set to SingleSelect, you can use the SelectionChanged event to be notified of a new row being selected (by mouse or arrow keys).

Need extra support?

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

Learn More

Forum Channels