focus gets always back to original form

Posted by: bsnm on 8 September 2017, 1:33 pm EST

  • Posted 8 September 2017, 1:33 pm EST

    Hi...


    when I use the Click or Doubleclick event of the spread and open a new form, focus gets back to the original form...


    How can I overcome this problem?


    Thanks

  • Replied 8 September 2017, 1:33 pm EST

    I did the following quick test and the second form has the focus...

    Private Sub FpSpread1_CellClick(ByVal sender As System.Object, ByVal e As FarPoint.Win.Spread.CellClickEventArgs) Handles FpSpread1.CellClick
    Dim f As New TestForm
    f.ShowDialog()
    End Sub

  • Replied 8 September 2017, 1:33 pm EST

    Thanks for your reply BobM, however I want to be allowed to navigate between the two forms


     ShowDialog() doesn't allow me to do so

  • Replied 8 September 2017, 1:33 pm EST

    Hello,


    You can set the e.Cancel parameter to True to have Spread not do it's default processing of the Click or DoubleClick events. This will keep focus on the form you are opening.

  • Replied 8 September 2017, 1:33 pm EST

    Thanks scotts


    setting <FONT color=#990000>e.Cancel = True</FONT> fixed the problem


    <img src="/emoticons/emotion-1.gif" alt="Smile" />

Need extra support?

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

Learn More

Forum Channels