Hi Tim,
Thanks for your reply but i think you misunderstand the situation. The
controls are "walking" right off/under the bottom of the containing
container.
I appreciate that one control above another will yield the behaviour your
referring too, if both are anchored to the top and bottom.
Im talking about a situation where i have a tab control anchored to the all
four sides fo the form. On the various tab pages i have common controls and
usercontrols that are anchored to the top and bottom of the containing tab
page. Once i save, close, reopen or run the form, the controls are
overstretched such that they disappear under the tab page "bottom"
margin..... even though the tab page itself correctly scales according to
the form size. In other words if the tab page scales by 15% the usercontrols
might well scale 65%.
Ian
[quoted text, click to view] "Tim_Mac" <tim@mackey.ie> wrote in message
news:1125322114.873907.94960@g47g2000cwa.googlegroups.com...
> hi ian,
> it's a bit annoying, but it only really works to have one control
> anchored to the bottom. it does make sense when you think about it,
> although it would be nice if there was a 'distribute size evenly' mode
> for a container layout.
> the behaviour you are seeing happens because when the form stretches,
> all the other controls stretch because they are told to keep the same
> distance from the bottom of the form. they then extend over the tops
> of the controls beneath (which are anchored to the top, so the tops
> always stay at the same place), which results in the overlap you are
> seeing.
> you need to decide which control will do the stretching, and keep the
> others in to a fixed height, presumably anchored to the top and left.
> you can listen out for the Form_Resize event, and programatically set
> the sizes of the controls. this isn't too hard. ask for code sample
> if you would like one.
>
> tim
>