F2 F3 F4 how to prevent spread overtook these function keys

Posted by: wwu-sec on 8 September 2017, 3:37 am EST

  • Posted 8 September 2017, 3:37 am EST

    in my harsh project, F2 F3 F4 already defined in outside container, but when spread cell get focus, these function keys are routed to spread specific function, i don’t need that, please teach me, it is very busy project, thanks a lot!!

  • Posted 8 September 2017, 3:37 am EST

    Hello,

    You would need to cancel the action of the keys in the InputMap of Spread.

     
    		Dim im As FarPoint.Win.Spread.InputMap

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

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

  • Posted 8 September 2017, 3:37 am EST

    Dear BobM,



    my F2 handler is a customized function, that will be fine? i mean when hit F2 in spread cell, it should invoke that customized F2 handler.







    thanks a lot.

  • Posted 8 September 2017, 3:37 am EST

    What is it you want to happen when you hit the F2 key?

  • Posted 8 September 2017, 3:37 am EST

        'disable Function key in farpoint spread, because function key already defined in FORM
    



    Dim im As FarPoint.Win.Spread.InputMap



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



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







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



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







    ==============



    it works! thanks a lot!!!

  • Posted 17 August 2021, 1:21 pm EST

    I have a problem when applying your direction in my code. Please tell me what are ‘grid_upper’ and ‘grid_bottom’?

  • Posted 17 August 2021, 2:15 pm EST

    I found it. It is the spread that I want to enable the key F2, F3, F4.

    We set these code in loading form. It works well.

    Thank you very much. It helped me more.

Need extra support?

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

Learn More

Forum Channels