property Group.BackColor as Color
Retrieves or sets the group's background color.

 TypeDescription 
   Color A color expression that indicates the background color of the group's caption. The last 7 bits in the high significant byte of the color to indicates the identifier of the skin being used. Use the Add method to add new skins to the control. If you need to remove the skin appearance from a part of the control you need to reset the last 7 bits in the high significant byte of the color being applied to the background's part  

Use the BackColor property to specify the group's caption's background color. Use the BackColorList property to specify the background color for group's list. Use the BackColorGroup property to specify a default background color for groups. Use the <bgcolor> built in HTML tag in the Caption property to define portions of text using a specified background color. The BackgroundExt property provides unlimited options to display more colors, icons, HTML, pictures, frames to any group.

In VB.NET or C# you require the following functions until the .NET framework will provide:

You can use the following VB.NET function:
     Shared Function ToUInt32(ByVal c As Color) As UInt32
         Dim i As Long
	 i = c.R
	 i = i + 256 * c.G
	 i = i + 256 * 256 * c.B
	 ToUInt32 = Convert.ToUInt32(i)
     End Function 
You can use the following C# function:
private UInt32 ToUInt32(Color c)
{
	long i;
	i = c.R;
	i = i + 256 * c.G;
	i = i + 256 * 256 * c.B;
	return Convert.ToUInt32(i);
}

The following VB sample changes the group's background color:

With ExplorerBar1.Groups(0)
    .BackColor = vbBlue
End With

The following C++ sample changes the group's background color:

m_explorerbar.GetGroups().GetItem( COleVariant( long(0) ) ).SetBackColor( RGB(0,0,255) ) ;

The following VB.NET sample changes the group's background color:

With AxExplorerBar1.Groups(0)
    .BackColor = ToUInt32(Color.Blue)
End With

The following C# sample changes the group's background color:

axExplorerBar1.Groups[0].BackColor = ToUInt32(Color.Blue);

The following VFP sample changes the group's background color:

With thisform.ExplorerBar1.Groups(0)
	.BackColor = RGB(0,0,255)
EndWith

 


Send comments on this topic.
1999-2015 Exontrol.COM, Software. All rights reserved.