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.

Backcolor of ParentBarItem

Thread ID:

Created:

Updated:

Platform:

Replies:

2104 Dec 16,2002 03:17 PM Dec 20,2002 10:03 AM Windows Forms 4
loading
Tags: Tools
Lance Levendowski
Asked On December 16, 2002 03:17 PM

Is there a way to change the Backcolor of a ParentBarItem? If the IsMainMenu Flag is set then the Backcolor is automatically set to the Backcolor of the Parent Form. But, all of the other ParentBarItems keep their Gray Backcolor. Thanks.

Administrator [Syncfusion]
Replied On December 18, 2002 07:15 AM

Lance, Did you actually mean changing the back color of the Bar objects (representing the toolbars)? There is a MenuColors class (please refer class reference) that lets you change the colors associated with the different parts and states of the menus and toolbars, globally. Regards, Praveen Ramesh

Lance Levendowski
Replied On December 18, 2002 02:15 PM

Yes, MenuColors.MainMenuBackColor and MenuColors.CommandBarBackColor do what I was looking for. Unfortunately, the Controls still get drawn in Gray if I set their corresponding BackColors to Nothing (i.e., Color.Empty). Could you include a Backcolor property for Bar Controls or at least use the Parent's Backcolor when a Bar's Backcolor is set to Nothing? I want to have a white main form with colorful secondary forms (light blue, light green, etc.). It would be nice if the Backcolor of the Bars would match the Backcolor of their Parent. Thank you, Lance

Administrator [Syncfusion]
Replied On December 19, 2002 07:09 AM

Lance, When you say "Controls still get drawn in Gray", I am not sure which Controls you mean? Is it the CommandBarControl (that hosts the Bar component) or did you mean some custom Control that you use inside the command bar? If you could attach a sample project, that would be a big help. Note that our XPMenusMDI sample has a "Custom Colors" toolbar button, that will apply custom colors to the menus and toolbars. Thanks Praveen Ramesh

Lance Levendowski
Replied On December 20, 2002 10:03 AM

Here is a sample. Just run the app and select the different Forms to see what I am talking about. I want the Backcolor of the Toolbars to match the Backcolor of the Parent Control (which are Forms in this example). Note that solution is written in VB.NET v1.1.4322. Thanks again. > Lance, > > When you say "Controls still get drawn in Gray", I am not sure which Controls you mean? Is it the CommandBarControl (that hosts the Bar component) or did you mean some custom Control that you use inside the command bar? > > If you could attach a sample project, that would be a big help. > > Note that our XPMenusMDI sample has a "Custom Colors" toolbar button, that will apply custom colors to the menus and toolbars. > > Thanks > Praveen Ramesh >

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.

;