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

Determine if BarItem is shown and its Bar

Thread ID:





43960 May 9,2006 07:47 PM UTC May 23,2006 03:18 PM UTC WinForms 5
Tags: Tools
Administrator [Syncfusion]
Asked On May 9, 2006 07:47 PM UTC

Is there a way to determine if a BarItem on a Bar has been turned off (hidden?) via the Quick Customize menu? When I check the BarItem''s Visible property it is always true even when I turn the item off with the Quick Customize menu.

J.Nagarajan [Syncfusion]
Replied On May 10, 2006 05:07 PM UTC

Hi Don, I have tested this issue and it seems to be a bug in menus. I have logged a bug report # 2058 in this regard. You can track the progress of this issue at this link below : Defect #2058 - Visible property of BarItem always returns true after unchecking the BarItem with Quick Customize menu. Thanks for bringing this issue to our attention. We will fix this issue at the earliest and keep you informed. Thank you, J.Nagaraj

Administrator [Syncfusion]
Replied On May 10, 2006 06:42 PM UTC

Thanks. I figured the .Visible property may always be true because the manager doesn''t really use it. A BarItem can be on multiple bars (in this case, a menu and a tool bar), just because it is turned off on the toolbar via QuickCustomize doesn''t turn it off in the menu. I thought maybe this information was tracked by the bar itself but I can''t figure out how. Thanks again.

Mano J [Syncfusion]
Replied On May 11, 2006 03:41 PM UTC

Hi Don, Thanks for the information. You can get the BarItem which is hidden using the Quick Customize Menu by deriving a customBarManager from MainFrameBarManager and override SetUserVisibilityPreferenceInBar method, which gets triggered when a BarItem is hidden using "Add or Remove Buttons" context menu. public class CustomBarManager : MainFrameBarManager { public override void SetUserVisibilityPreferenceInBar (BarItem barItem, Bar bar, bool showOrHide) { if (!showOrHide) { Console.WriteLine(barItem.Text); } base.SetUserVisibilityPreferenceInBar(barItem, bar, showOrHide); } } Please let me know if this helps you. Regards, Mano sample.zip

Administrator [Syncfusion]
Replied On May 12, 2006 11:22 PM UTC

Thanks for the reply. This gets me part of what I need. Is there a way to duplicate the QuickCustomize hiding of BarItems in code?

Mano J [Syncfusion]
Replied On May 23, 2006 03:18 PM UTC

Hi Don, Sorry for this late reply. You can directly use MainFrameBarManager''s SetUserVisibilityPreferenceInBar method to show/hide BarItems in a bar through code. this.mainFrameBarManager1.SetUserVisibilityPreferenceInBar(this.barItem4, this.bar2, false); Please let me know if this helps you. Regards, Mano


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