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

Backcolor of ParentBarItem

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.

4 Replies

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


LL Lance Levendowski 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


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


LL Lance Levendowski 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 >

Loader.
Live Chat Icon For mobile
Up arrow icon