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
925
PopupControlContainerTool takes focus from application
posted

I am using a PopupControlContainerTool and I've noticed every time it is opened the main application window loses focus (title bar loses focus). This is distracting when the tool is opened several times (lots of tools on my context menu show these popup controls.

I've noticed that the sample app has the same behaviour. Is there a known way to get rid of this behaviour?

 

Parents
No Data
Reply
  • 44743
    posted

    The UltraToolbarsManager does not have a way to tell PopupControlContainerTools to not focus their Controls when they are dropped down. If the Control can be focused, an attempt will be made to put focus into that Control. But you may be able to prevent the Control from being focusable. One way is to set either Visible or Enabled to False on the Control, but obviously, this won't work if you want your users to actually interact with the Control. The only other way is to use a custom Control with no child Controls, and which has the Selectable control style turned off. This can be done by calling the following line in your Control's constructor:

    this.SetStyle(ControlStyles.Selectable, false);

    If you cannot use any of these approaches, you can submit a feature request for a property on the PopupControlContainerTool to prevent it from putting focus into its Control upon dropping down.

Children