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

Thread ID:

Created:

Updated:

Platform:

Replies:

48772 Sep 4,2006 11:32 AM Mar 19,2007 10:26 AM Windows Forms 14
loading
Tags: Tools
Mario
Asked On September 4, 2006 11:32 AM

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.




Mario
Replied On September 4, 2006 12:09 PM

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?

Gopalakrishnan S [Syncfusion]
Replied On September 4, 2006 04:11 PM

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

Mario
Replied On September 4, 2006 06:39 PM

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?


Gopalakrishnan S [Syncfusion]
Replied On September 4, 2006 10:05 PM

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

Mario
Replied On September 9, 2006 02:21 PM

This works like a charm. Thank you.

Mario
Replied On September 9, 2006 05:01 PM

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.

Mano J [Syncfusion]
Replied On September 11, 2006 05:34 PM

Hi Mario,

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

Regards,
Mano

Julie Levy
Replied On March 8, 2007 02:21 PM

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

Julie Levy
Replied On March 13, 2007 03:12 PM

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

Murugan [Syncfusion]
Replied On March 14, 2007 07:15 PM

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

Julie Levy
Replied On March 15, 2007 05:17 PM

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

Poly J [Syncfusion]
Replied On March 16, 2007 07:39 AM

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


Julie Levy
Replied On March 16, 2007 04:38 PM

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

Poly J [Syncfusion]
Replied On March 19, 2007 10:26 AM

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


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.

;