Opening context menu causes form to loose focus

2 posts, 1 answers
  1. Randy
    Randy avatar
    19 posts
    Member since:
    Oct 2012

    Posted 22 Oct 2013 Link to this post

    In the new version of the WinForms controls (2013.3.1016.40) opening a context menu will cause the form to loose focus and flash.

    This also makes the context menu not close all the time on the first click away form the menu since the form regains focus on the first click and then registers the click away on the second click.

    This seems to be happening on all controls even when using the default context menu like in the grid view.
  2. Answer
    George
    Admin
    George avatar
    500 posts

    Posted 25 Oct 2013 Link to this post

    Hi Randy,

    Thank you for contacting us.

    I can confirm that this is an issue with our context menu. I have logged it in our Public Issue Tracking System and you can find it at - http://www.telerik.com/support/pits.aspx#/public/winforms/16028. As a workaround you can use this code:
    void grid_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
    {
        e.Cancel = true;
        e.ContextMenu.Show(this.grid.GridViewElement, this.grid.PointToClient(MousePosition));
    }

    I have also updated your Telerik Points for reporting this.

    I hope this helps.

    Regards,
    George
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top