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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ForeColor of text always Black after invoked event handler: Button_DrawToolbarItem()

Thread ID:





69891 Nov 15,2007 07:49 PM UTC Nov 23,2007 06:26 AM UTC WinForms 1
Tags: Tools
Asked On November 15, 2007 07:49 PM UTC


After the event handler below is invoked the button's text is ALWAYS Black.

void Button_DrawToolbarItem(object sender, DrawToolbarItemEventArgs drawItemInfo)

The button's properties:
* CustomActiveTextColor
* CustomDisabledTextColor
* CustomNormalTextColor

are all set to color other than Black, yet the drawItemInfo.ForeColor property in the event handler is coming up as black.

Any input where the color Black is being set?

How this setting can be changed?

Thank you for your response.

Administrator [Syncfusion]
Replied On November 23, 2007 06:26 AM UTC

Hi Asaf,

Thank you for your interest in Syncfusion products.

Please invoke DrawInterior() of drawiteminfo eventargs to apply the custom settings for the interior of the baritem.

The following code snippet illustrates this.


private void barItem1_DrawToolbarItem(object sender,DrawToolbarItemEventArgs drawinteminfo)
Syncfusion.Windows.Forms.Tools.XPMenus.BarItem bi = (Syncfusion.Windows.Forms.Tools.XPMenus.BarItem)sender;
bi.CustomActiveTextColor = Color.Blue;
bi.CustomDisabledTextColor = Color.Yellow;
bi.CustomNormalTextColor = Color.Red;

Here is a sample for your reference.


Please let me know if this helps.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon