changing color of groupbaritem

Hi,
Is it possible to change the colors of the groupbaritems while using the office2003 visual style?
I'm using the 4.2 release.
thanks.

1 Reply

HA haneefm Syncfusion Team October 25, 2007 03:19 PM UTC

Hi Dudi,

You would have to derive the GroupBar class and override the DrawGroupBarItem method to customize the background color of the GroupBarItem in a GroupBar. Below are the codes:

public class MyGroupBar : GroupBar
{
public MyGroupBar(): base()
{}

protected override void DrawGroupBarItem(Graphics gfxTarget, int nindex, Rectangle rcbar)
{
base.DrawGroupBarItem(gfxTarget, nindex, rcbar);
gfxTarget.FillRectangle(new SolidBrush(Color.Red), rcbar);
}
}


Best regards,
Haneef

Loader.
Up arrow icon