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.

Set XPMenu bar visible

Thread ID:

Created:

Updated:

Platform:

Replies:

41347 Feb 28,2006 04:33 AM Aug 7,2006 02:20 PM Windows Forms 4
loading
Tags: Tools
Regis Mettraux
Asked On February 28, 2006 04:33 AM

Hello, I use actually the version 4.1 and I have a problem when setting a toolbar visible or not. I use the following expression the set the toolbar visible or not. With older version it was working. void viewToolbar_Click(object s, System.EventArgs e) { this.toolbar1.BarStyle = this.toolbar1.BarStyle ^ BarStyle.Visible; } Thanks in advance. Régis

Mano J [Syncfusion]
Replied On February 28, 2006 08:23 AM

Hi Regis, We regret for the inconvenience caused. I am able to see the problem with the BarStyle property and I have logged a bug report in this regard. Defect # 1598 - BarStyle property is not working when set dynamically. We will try our very best to fix this issue at the earliest and keep you informed. You can change the visibility of a bar by getting the CommandBar and use SetBarVisibility method and set the Bar''s visiblity to false. this.mainFrameBarManager1.GetCommandBarManager().SetBarVisibility(this.bar2, false); Please let me know if you have any questions. Thanks for using Syncfusion products. Regards, Mano

Leow Kah Man
Replied On August 7, 2006 04:51 AM

I have a custom Bar.

The initial values of the BarStyle:
AllowQuickCustomizing | MultiLine | Visible | DrawDragBorder

I use the following code to remove visibility:
bar.BarStyle -= BarStyle.Visible

The BarStyle property now returns:
AllowQuickCustomizing | MultiLine | DrawDragBorder

I then tried to add it back using:
bar.BarStyle |= BarStyle.Visible;

The value now becomes:
AllowQuickCustomizing | MultiLine | Visible | DrawDragBorder

However, the bar is still invisible.

4.202.0.37

Leow Kah Man
Replied On August 7, 2006 05:02 AM

I searched on this forum and found a suggestion:
CommandBar cmdBar = mainFrameBarManager.GetBarControl(bar);
cmdBar.Visible = true;

The CommandBar method works perfectly but not the BaseStyle method.

I tried to produce a sample but strangely my sample works fine using the BarStyle approach.


Mano J [Syncfusion]
Replied On August 7, 2006 02:20 PM

Hi Leow,

I am also unable to see the problem in my test sample.

Can you please post the menus code in your application, so that we can re-create a sample with the code and try reproducing the problem with BarStyle?. You can also log an incident and post the code.

Regards,
Mano

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.

;