Potentially you could make a control at design time which is a label-textbox
pair and set the lable and the usercontrol to autosize. You may need to put
in some code to keep moving the text box to be immediatly after the label (or
you could use panels and docking but they would consume handles quickly).
Then add these to the form and runtime.
Someone somewhere has to code the logic you want, it would be great if MS
could guess all our needs but sometimes, what you see as everyday, they would
have designed forms differently and therefore wouldnt encounter.

Signature
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
> I'm building a UserControl that contains a number of other controls
> that it creates and lays out at runtime. I've been messing about
[quoted text clipped - 36 lines]
> Bob Rossney
> rrossney@gmail.com
rrossney@gmail.com - 06 Feb 2007 17:16 GMT
On Feb 5, 2:46 am, Ciaran O''Donnell
<CiaranODonn...@discussions.microsoft.com> wrote:
> Potentially you could make a control at design time which is a label-textbox
> pair and set the lable and theusercontrolto autosize. You may need to put
> in some code to keep moving the text box to be immediatly after the label (or
> you could use panels and docking but they would consume handles quickly).
> Then add these to the form and runtime.
I don't think this solves the problem I'm having, which pertains to
the vertical alignment of the controls. Positioning the controls so
that they align on the snapline at design time is fine, so long as the
user never changes the font size. But the position of the snapline
depends on the font size. If the font size changes at run time, the
snapline, which is a design-time parameter, isn't available.
This is why I'm sure someone has solved this problem: MSFT is urging
us to make dynamically UIs, and part of that dynamism is giving the
users control over the UI's font size. It seems unlikely that they'd
create a feature that broke as soon as people did what they were
suggesting they do.
Bob Rossney
rbr@well.com