I have an application based on two user controls and one form. This form is parent to my 2 user controls and i pragmatically add them to the form. My issue here is that when anchor components in the user control, they are not anchored in the form. So when re-sizing the form by dragging one of the corners, it seems like the user control does not also get re-sized. I was told that i had to listen to the Forms size and append that size to the User control. Is that a good solution? if yes how would i do that?
My user controls are inserted in a tab component btw.
This is my code for adding the user controls to the form. (if it is needed)
public void addUC(UserControl control, TabPage tab)
{
control.Parent = tab;
}
can anyone help ?
You might want to anchor the child usercontrols using the
Anchorproperty.