Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
35
UltraExpandableGroupBox do not resize automatically
posted

Hello,

I have to create dynamically several UltraExpandableGroupBox. All of them are inserted into a .NET FlowLayoutPanel just after been created.
My FlowLayoutPanel is docked in my form and I want my UltraExpandableGroupBox resize automatically (specially the Horizontal size) into the FlowLayoutPanel when the user change the form size. Unfortunatly, my UltraExpandableGroupBox never resize even when the FlowLayoutPanel resize itself.
Here is a sample of my code. Thanks if anyone can help me to find out what to do.

UltraExpandableGroupBox uegb = new UltraExpandableGroupBox();
UltraExpandableGroupBoxPanel panel = new UltraExpandableGroupBoxPanel();
MyUsercontrol uc = new MyUsercontrol();

((ISupportInitialize)uegb).BeginInit();
uegb.SuspendLayout();
panel.SuspendLayout();

uc.Presenter = _presenter;
uc.Dock = DockStyle.Top;
uc.BuildAndBindFields(container, regroupement);     // build MyUserconrol content.

// box

uegb.Controls.Add(panel);
uegb.Dock = DockStyle.Top;
uegb.MinimumSize = new System.Drawing.Size(685, 24);
uegb.ExpandedSize = new System.Drawing.Size(685, 500);
uegb.ExpansionIndicator = Infragistics.Win.Misc.GroupBoxExpansionIndicator.Far;
uegb.Location = new System.Drawing.Point(3, 3);
uegb.Text = container.GetTraduction(regroupement);
uegb.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003;
uegb.Expanded = false;

// panel

panel.Controls.Add(uc); panel.AutoScroll = true;
panel.Dock = System.Windows.Forms.DockStyle.Fill;
panel.Location = new System.Drawing.Point(2, 22);
panel.Size = new System.Drawing.Size(681, 426);

((ISupportInitialize)(uegb)).EndInit();
panel.ResumeLayout(false);               
uegb.ResumeLayout(false);

Parents Reply Children
No Data