The UltraGroupBox represents a standard Windows GroupBox with a high degree of flexibility.
Syntax
| Visual Basic (Declaration) | |
|---|
Public Class UltraGroupBox
Inherits Infragistics.Win.UltraControlBase
Implements Infragistics.Shared.IUltraLicensedComponent, Infragistics.Win.AppStyling.ISupportAppStyling, Infragistics.Win.IUltraControl, Infragistics.Win.IUltraControlElement |
| C# | |
|---|
public class UltraGroupBox : Infragistics.Win.UltraControlBase, Infragistics.Shared.IUltraLicensedComponent, Infragistics.Win.AppStyling.ISupportAppStyling, Infragistics.Win.IUltraControl, Infragistics.Win.IUltraControlElement |
Example
This snippet shows how to use the HeaderAppearance property to add an image to the header and fine-tune the position of the caption.
| Visual Basic | Copy Code |
|---|
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 |
| C# | Copy Code |
|---|
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;
} |
Remarks
See Also