We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Generic way to get to menu bar items.

Thread ID:

Created:

Updated:

Platform:

Replies:

5863 Jul 21,2003 02:13 PM UTC Jul 22,2003 06:13 PM UTC WinForms 1
loading
Tags: Tools
grer
Asked On July 21, 2003 02:13 PM UTC

When I try to get to the form controls to get the bar items the bi are layered into the CommandDockBarExt. Is there anyway to get to the bar item generically? Syncfusion.Windows.Forms.Tools.XPMenus.CommandDockBarExt ctl; Control returnControl=null; foreach(Control con in container.Controls) { if (con.GetType() == typeof(Syncfusion.Windows.Forms.Tools.XPMenus.CommandDockBarExt)) { ctl = (CommandDockBarExt)con; //Can't get the controllerEXT from the ctl. //Thus unable to get to the baritems. There has to be a way to get to this... // foreach(BarItem bi in ctl.controllerExt.Manager.Items) // { // MessageBox.Show(bi.Text); //// if( == name) //// { //// returnControl = bi; //// } // } } else { if (con.HasChildren) returnControl=GetControl(con,name); else if(con.Name==name) returnControl = con; } //if found stop searching if(returnControl !=null) break; } return returnControl;

Ramesh Praveen [Syncfusion]
Replied On July 22, 2003 06:13 PM UTC

Hi, The CommandDockBarExt controls should have a CommandBarExt control which in turn will include a Bar property that will provide you the underlying Bar. The Bar.Items will provide you the list of BarItems. Of course, there will be some casting necessary in the process. Regards, Praveen

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;