Ticket T384411
Visible to All Users

How to focus a BarEditItem of a merged RibbonControl after showing an MDI child

created 9 years ago (modified 9 years ago)

[Cloned from Defaulting focus to full text search on newly opened root list views]
Here is an example demonstrating this task. When the main form is shown, the barEditItem1 item should be focused.

Answers approved by DevExpress Support

created 9 years ago

Hello,
After ribbons are merged, an additional link to your original BarEditItem is created and put to the master RibbonControl So, you need to focus the second item's link.
In addition, it is better to wait until the merging algorithm is completely executed. As a result, re-write your line in the following manner:

C#
BeginInvoke(new Action(() => { ((BarEditItemLink)form.BarItem.Links[1]).Focus(); }));

I hope you find this information useful.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.