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 : Nov 16th 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:

Created:

Updated:

Platform:

Replies:

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

Hello,

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.

[C#]

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;
drawinteminfo.DrawInterior();
}


Here is a sample for your reference.

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

Please let me know if this helps.

Regards,
Jaya


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.

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

;