The UltraExpandableGroupBox represents a standard Windows GroupBox with the ability to expand and collapse.
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()
panel.Controls.Add(btn)
btn.Text = "Click Me"
btn.Size = New Size(75, 30)
btn.Location = New Point(210, 190)
Dim txt As 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)
End Sub
'Declaration
Public Class UltraExpandableGroupBox
Inherits UltraGroupBox
Implements Infragistics.Win.AppStyling.ISupportAppStyling, Infragistics.Win.IUltraControl, Infragistics.Win.IUltraControlElement, Infragistics.Win.Touch.ISupportTouchMetrics, Infragistics.Win.UIAutomation.IProvideUIAutomation
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 );
}
'Declaration
Public Class UltraExpandableGroupBox
Inherits UltraGroupBox
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