Keep contents in panel

sarthemaker

Active member
Joined
Sep 4, 2009
Messages
36
Programming Experience
5-10
I have a panel with other controls in it, but new controls will be added on runtime which will cause them to move out of the panel on the right side.

Does anyone know of a way so one the controls in a panel become too wide for the parent, then the contents aligns to the right?
 
To add a control dynamically to a panel is as simple as calling Panel1.Controls.Add(NewControl). You then need to position and size everything as needed including setting the anchor properties of the other controls in the panel. Another option that could be considered is using multiple panels so that the controls in the one panel (with anchor properties set) will automatically resize when you add your dynamic controls to the second panel and adjust its panel size.
 
Back
Top