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.
Unfortunately, activation email could not send to your email. Please try again.

XPmenus and Enabled property

Thread ID:

Created:

Updated:

Platform:

Replies:

31796 Jul 14,2005 11:01 AM Jul 15,2005 02:50 AM Windows Forms 4
loading
Tags: Tools
Administrator [Syncfusion]
Asked On July 14, 2005 11:01 AM

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 11:47 AM

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 03:44 PM

I am using version 3.2.1.0

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

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 02:50 AM

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

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.

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.

;