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. Image for the cookie policy date

XPmenus and Enabled property

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.)

4 Replies

AD Administrator Syncfusion Team 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.


AD Administrator Syncfusion Team July 14, 2005 07:44 PM UTC

I am using version 3.2.1.0


AD Administrator Syncfusion Team 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.


AD Administrator Syncfusion Team July 15, 2005 06:50 AM UTC

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

Loader.
Up arrow icon