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 lost when copying ToolStripEx

I have inserted a ToolStripEx onto a TabPageAdv and changed the BackColor to 204; 204; 204. I set Office12Mode to false for the toolstrip. This resulted in a nice looking dark grey toolbar on top of the tab page.

Then I copied the ToolStripEx to another TabPageAdv. The BackColor setting was the same in the copy but the background appeared white.

I tried to reset the Office12Mode and BackColor properties but this did not help.

The only way to get the correct color back, was to remove the copy, insert a new ToolStripEx on the other tab page and create all items on it from scratch. I had to do this 3 times, because I needed a similar ToolStripEx on three pages.




14 Replies

MA Mario September 4, 2006 04:09 PM UTC

I have now found, that it does NOT help to recreate the ToolStripEx from scratch.

As long as there are two ToolStripEx inserted into tab pages, all these strips become transparent except the first one.

Changing the BackColor does not help.

Any idea?


GS Gopalakrishnan S Syncfusion Team September 4, 2006 08:11 PM UTC

Hi Mario,

I have tested for this issue using version 4.2, it will be working fine. I have just followed the below steps,

1.Insert a ToolStripEx to the TabPageAdv and set the Office12Mode to false for the ToolStripEX.
2.Set the backcolor for the ToolStripEx.
3.Add the item to the ToolStripEx.
4.Copy the ToolStripEx to the TabPageAdv2 and TabPageAdv3.

Please refer the attachments.

Thanks for your interest on syncfusion products.

Regards,
S.Gopal.

ToolStripSample.zip


MA Mario September 4, 2006 10:39 PM UTC

I have reproduced the failure with the example, that you have sent to me.

Just set ThemesEnabled to true for the tab control. Then you should be able to see that the ToolStripEx controls become transparent.

There is no ThemesEnabled property for ToolStripEx and as such there seems to be no way to avoid this unwanted behaviour.

I would like to apply Themes to all controls but still be able to change the BackColor of the ToolStripEx controls. Is this somehow possible?



GS Gopalakrishnan S Syncfusion Team September 5, 2006 02:05 AM UTC

Hi Mario,

Sorry for the inconvenience. You can change the backcolor of the ToolStripEx on the TabControlAdv when tab control ThemeEnabled property set to true. I have created the sample application attached to its. I have just followed the below steps,

1.Select the TabControlAdv from ToolBox and put it into the form.
2.Set the ThemeEnabled property of tabControlAdv to true.
3.Select the Panel and put it into the TabPageAdv1.
4.Set the AutoSize proerty of panel control to true.
5.Select the ToolStripEx and put it into the panel.
6. Copy the panel with ToolStripEx to the TabPageAdv2 and TabPageAdv3.

Now you can change the property backcolor and Office12mode during design time and runtime also.

Please refer the attachments.

Regards,
S.Gopal.

ToolstripSample.zip


MA Mario September 9, 2006 06:21 PM UTC

This works like a charm. Thank you.


MA Mario September 9, 2006 09:01 PM UTC

In a future release, it would be very nice, if a ToolStripEx could have its BackColor be independent of other controls BackColor, even if Themed is set to true.

If the ToolStripEx and the Panel have the same BackColor like in your example, then appearance changes for the ToolStripEx in some scenarios.


MJ Mano J Syncfusion Team September 11, 2006 09:34 PM UTC

Hi Mario,

Thanks for the update. We will definitely make this feature available in later versions.

Regards,
Mano


JL Julie Levy March 8, 2007 07:21 PM UTC

Hi -
has there been any work on this to make the backcolor of the ToolstripEx independant?
I tried the steps you outlined to set the background to white, but i used Microsoft's tab control not yours. There is a bug with yours which prevents me from using them.
Is there a way to make this work with Microsoft Tabs, Syncfusion GradiantPanel and the ToolstripEx?
Thanks,
Julie


JL Julie Levy March 13, 2007 07:12 PM UTC

Any response? I just need a way to set the backcolor and border on the ToolStripEx control. Is it possible?


MU Murugan Syncfusion Team March 14, 2007 11:15 PM UTC

Hi Julie,

Sorry for the delay in responding. BackColor can be changed when Office12Mode = false. If you want to set BackColor please set ToolStripEx.Office12Mode = false. Please let me know if you have any other queries.

Thanks,
Murugan P.S


JL Julie Levy March 15, 2007 09:17 PM UTC

Thanks for your reply - this works.
One more backcolor question. How do i change the backcolor for a toolstrip item when the user hovers over it or when it is pressed/checked?

When i set the backcolor in the toolstripitem_click event, it does not work.

Thanks,
Julie


PJ Poly J Syncfusion Team March 16, 2007 11:39 AM UTC

Hi Julie,
Please refer to the attached sample where the tooltrip item color is changing in the toolstripitem_click event. Please let us know if this is working for you.

http://websamples.syncfusion.com/samples/Tools.Windows/F48772/main.htm

Thanks for your interest in Syncfusion products.
Regards,
Poly



JL Julie Levy March 16, 2007 08:38 PM UTC

Hi -
Thanks for your response. I'm trying to change the back color when the button is checked. The click event seems to happen before the checkstate is updated, so that doesn't work (i get the opposite effect). So instead i have to use the CheckStateChanged event. But it doesn't seem to work. I have updated the sample. Please let me know how i can change the look of the "checked" button.
Thanks,
Julie

F48772.zip


PJ Poly J Syncfusion Team March 19, 2007 02:26 PM UTC

Hi Julie,

The present architecture shows the toolstip button in Office Xp Style when the toolstrip button is selected. You will be able to set the color for uncheck state. But by default the button style will change to office XP when the toolstip button in check state.

Thanks for using Syncfusion Products.

Best Regards,
Poly


Loader.
Live Chat Icon For mobile
Up arrow icon