Gets the control which makes up the client area of the
UltraPanel and hosts all child controls.
Syntax
Property Value
A .Net Panel-derived control which makes up the client area of the UltraPanel.
Example
The following code demonstartes how to control the automatic scrolling capability of the UltraPanel.
| Visual Basic | Copy Code |
|---|
Imports System.Windows.Forms
Imports Infragistics.Win
' Allow the UltraPanel to automatically show scroll bars based on its contents.
Me.UltraPanel1.AutoScroll = True
' Set the size of the UltraPanel
Me.UltraPanel1.Size = New Size(300, 300)
' Set the auto scroll margin so that 20 pixels of space are between the right
' and bottom edges of the child controls and the edges of the area the user can
' scroll to.
Me.UltraPanel1.AutoScrollMargin = New Size(20, 20)
' If no child control exists or they are not positioned far enough, make sure
' the scrollable area of the UltraPanel is at least 100 pixels wide and 500 tall.
Me.UltraPanel1.AutoScrollMinSize = New Size(100, 500)
' Add a .Net Button control to the UltraPanel which extends to 350 pixels in the
' X and Y directions, which will cause the UltraPanel to show both scroll bars.
Dim button As New Button()
button.Location = New Point(250, 250)
button.Size = New Size(100, 100)
Me.UltraPanel1.ClientArea.Controls.Add(Button) |
| C# | Copy Code |
|---|
using System.Windows.Forms;
using Infragistics.Win;
// Allow the UltraPanel to automatically show scroll bars based on its contents.
this.ultraPanel1.AutoScroll = true;
// Set the size of the UltraPanel
this.ultraPanel1.Size = new Size( 300, 300 );
// Set the auto scroll margin so that 20 pixels of space are between the right
// and bottom edges of the child controls and the edges of the area the user can
// scroll to.
this.ultraPanel1.AutoScrollMargin = new Size( 20, 20 );
// If no child control exists or they are not positioned far enough, make sure
// the scrollable area of the UltraPanel is at least 100 pixels wide and 500 tall.
this.ultraPanel1.AutoScrollMinSize = new Size( 100, 500 );
// Add a .Net Button control to the UltraPanel which extends to 350 pixels in the
// X and Y directions, which will cause the UltraPanel to show both scroll bars.
Button button = new Button();
button.Location = new Point( 250, 250 );
button.Size = new Size( 100, 100 );
this.ultraPanel1.ClientArea.Controls.Add( button ); |
See Also