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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

XPmenus and Enabled property

Thread ID:





31796 Jul 14,2005 03:01 PM UTC Jul 15,2005 06:50 AM UTC WinForms 4
Tags: Tools
Administrator [Syncfusion]
Asked On July 14, 2005 03:01 PM UTC

I am trying to disable all my menus during a computation by code like this: foreach(BarItem barItem in this.childFrameBarManager.Items) barItem.Enabled = false; When the computation is finished I enable all the menus similarly. For the menus on my main MDI form this works fine. However, for the menus of the child MDI forms (which are merged with the menus from the main form) the ParentBarItems are not painted as disabled. This seems to be an update problem though, because if I try to click the menu, they will immediately be painted as disabled as they should. Similarly, after I enable all the menus again, the menus of the child form are not painted as enabled before I click them. Any ideas what is the problem here? Is there a way I can force the menus to repaint, so that the enabled/disabled state is shown properly? (I do call DoEvents, so this is not the problem.)

Administrator [Syncfusion]
Replied On July 14, 2005 03:47 PM UTC

Hi Kjetil, What version are you using? As far as I can tell, this is working correctly in our latest internal version. Regards, Gregory Austin Syncfusion Inc.

Administrator [Syncfusion]
Replied On July 14, 2005 07:44 PM UTC

I am using version

Administrator [Syncfusion]
Replied On July 14, 2005 08:26 PM UTC

Hi Kjetil, You might be able to force the bar control to refresh with the following code snippet. However, please be warned that I haven''t tried this as I wasn''t able to reproduce the problem. foreach (Bar bar in this.mainFrameBarManager1.Bars) { this.mainFrameBarManager1.GetBarControl(bar).Invalidate(); } You might just want to try waiting for our next release, which will include these fixes. Regards, Gregory Austin Syncfusion Inc.

Administrator [Syncfusion]
Replied On July 15, 2005 06:50 AM UTC

Your suggested code solved the problem. Thanks a lot, Gregory!


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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