The UltraGroupBox represents a standard Windows GroupBox with a high degree of flexibility.
This snippet shows how to use the HeaderAppearance property to add an image to the header and fine-tune the position of the caption.
Imports Infragistics.Win
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Display an image in the header.
Me.UltraGroupBox1.HeaderAppearance.Image = Bitmap.FromFile("c:\someSmallImage.bmp")
' Center the caption within the area of the header that it is being drawn.
' If you want to shift the location of the caption entirely,
' use the CaptionAlignment property.
Me.UltraGroupBox1.HeaderAppearance.TextHAlign = HAlign.Center
End Sub
'Declaration
Public Class UltraGroupBox
Inherits Infragistics.Win.UltraControlBase
Implements Infragistics.Win.AppStyling.ISupportAppStyling, Infragistics.Win.IUltraControl, Infragistics.Win.IUltraControlElement, Infragistics.Win.Touch.ISupportTouchMetrics, Infragistics.Win.UIAutomation.IProvideUIAutomation
using Infragistics.Win;
private void Form1_Load(object sender, System.EventArgs e)
{
// Display an image in the header.
this.ultraGroupBox1.HeaderAppearance.Image = Bitmap.FromFile( "c:\\someLittleImage.bmp" );
// Center the caption within the area of the header that it is being drawn.
// If you want to shift the location of the caption entirely,
// use the CaptionAlignment property.
this.ultraGroupBox1.HeaderAppearance.TextHAlign = HAlign.Center;
}
'Declaration
Public Class UltraGroupBox
Inherits Infragistics.Win.UltraControlBase
Implements Infragistics.Win.AppStyling.ISupportAppStyling, Infragistics.Win.IUltraControl, Infragistics.Win.IUltraControlElement, Infragistics.Win.Touch.ISupportTouchMetrics, Infragistics.Win.UIAutomation.IProvideUIAutomation
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2