Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
465
Form with WinToolbars not receiving focus
posted

Hi,

I have a problem where the focus is not being given to the form where the Toolbars is.

Here's the setup (you can try the example in attachment) : Form0 has a WinToolbars where there is a single button. This button, if the form has focus, launches a second identical form (Form 1). Form1 is owned by Form0. If you click again on the button on Form0, while the focus is on Form1, Form0 never get the focus so the event to launch a new form is not done.

If you use the same setup with a M$ MenuStrip, Form0 gets the focus when you press on a button of the toolbar while the focus is on Form1.

Is there a property that would allow the behaviour to be the same as M$? Or do I have to intercept the MouseClick on the WinToolbars and manually give focus to the form (hoping that this will be done prior to the ItemClick)?

Thank you

Chris

.NET V2010.2

Example.zip
Parents
No Data
Reply
  • 71886
    Offline posted

    Hello Chris,

    As you already said you could manually give the focus to Form0. You could do it in the ToolClick event like in the following code sample:

    private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)

    {

     this.Focus();

    ... your code ...

    }

    Please do not hesitate to ask if something comes up.

Children
No Data