Hi Michael,
I think your solution of using TableLayoutPanel control is perfect. In
fact, TableLayout is a new control shipped with VS 2005 and is designed to
rearrange the controls on the form when the form is resized.
Before the TableLayoutPanel control is available, we usually make use of
the Anchor or Dock property of the control to rearrange it when the form is
resized.
Anchoring a control to its parent control ensures that the anchored edges
remain in the same position relative to the edges of the parent control
when the parent control is resized. In your scenario, you could set the
Anchor property of the textbox to Left and Right.
Control's Dock property gets or sets which control borders are docked to
its parent control and determines how a control is resized with its parent.
Use the Dock property to define how a control is automatically resized as
its parent control is resized. For example, setting Dock to DockStyle.Left
causes the control to align itself with the left edges of its parent
control and to resize as the parent control is resized.
Note that the Anchor and Dock properties are mutually exclusive. Only one
can be set at a time, and the last one set takes precedence.
Hope this helps.
If you have anything unclear, please feel free to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.