UltraExpandableGroupBox Class

The UltraExpandableGroupBox represents a standard Windows GroupBox with the ability to expand and collapse.
Public Class UltraExpandableGroupBox 
   Inherits UltraGroupBox
   Implements Infragistics.Win.AppStyling.ISupportAppStyling, Infragistics.Win.IUltraControl, Infragistics.Win.IUltraControlElement, Infragistics.Win.Touch.ISupportTouchMetrics, Infragistics.Win.UIAutomation.IProvideUIAutomation 
public class UltraExpandableGroupBox : UltraGroupBox, Infragistics.Win.AppStyling.ISupportAppStyling, Infragistics.Win.IUltraControl, Infragistics.Win.IUltraControlElement, Infragistics.Win.Touch.ISupportTouchMetrics, Infragistics.Win.UIAutomation.IProvideUIAutomation  

The UltraExpandableGroupBox has all of the features of the UltraGroupBox plus the ability for it's content area to be expanded and collapsed by the end-user or programmatically. The interface provided for the end-user to toggle the expansion state is a GroupBoxExpansionIndicatorUIElement, which is located in the header of the control. The header is the part of the control which contains the caption, an optional image, and the expansion indicator.

This snippet demonstrates how you can add child controls to the UltraExpandableGroupBox. Note that you do not add them directly to the Controls collection of the UltraExpandableGroupBox, rather, you add them to the Controls collection of the Panel property.

Private Sub LoadChildControls()

    ' Get a reference to the UltraExpandableGroupBoxPanel in the groupbox.
    Dim panel As Infragistics.Win.Misc.UltraExpandableGroupBoxPanel = Me.ultraExpandableGroupBox1.Panel

    ' Create child controls and add them to the panel.
    Dim btn As New Infragistics.Win.Misc.UltraButton()


    btn.Text = "Click Me"
    btn.Size = New Size(75, 30)
    btn.Location = New Point(210, 190)

    Dim txt As New Infragistics.Win.UltraWinEditors.UltraTextEditor()


    txt.Text = "Enter some text..."
    txt.Size = New Size(200, txt.Size.Height)
    txt.Location = New Point(panel.Width / 2 - txt.Width / 2, 80)

End Sub
private void LoadChildControls()
	// Get a reference to the UltraExpandableGroupBoxPanel in the groupbox.
	Infragistics.Win.Misc.UltraExpandableGroupBoxPanel panel = this.ultraExpandableGroupBox1.Panel;

	// Create child controls and add them to the panel.
	Infragistics.Win.Misc.UltraButton btn = new Infragistics.Win.Misc.UltraButton();

	panel.Controls.Add( btn );

	btn.Text = "Click Me";
	btn.Size = new Size( 75, 30 );
	btn.Location = new Point( 210, 190 );
	Infragistics.Win.UltraWinEditors.UltraTextEditor txt = new Infragistics.Win.UltraWinEditors.UltraTextEditor();

	panel.Controls.Add( txt );

	txt.Text = "Enter some text...";
	txt.Size = new Size( 200, txt.Size.Height );
	txt.Location = new Point( panel.Width / 2 - txt.Width / 2, 80 );

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

See Also