Editing groupbaritem

Hi,
I want to change the background color of the
groupbaritems, I try to do this with the backgroundbrush property (I need to apply a Brush object), but this is working just with the XP visual style, Is there a way to do this with the office 2003 visual style?
Thanks.

1 Reply

HA haneefm Syncfusion Team October 16, 2007 11:07 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