Re: user control elements completely displaced when control is used on windows form
- From: Fabian <neutronstorm@xxxxxxxxxxxxxxxxx>
- Date: Fri, 04 Aug 2006 08:35:18 +0200
Hi Linda,
thanks for your reply. I neither used FlowLayoutPanel nor TableLayoutPanel. I got a single main form which was kind of a "rapid prototype" and just continued on it. I will just sketch hierarchically how I began:
*GroupBox
+GroupBox
-Combobox (4x)
-Label (8x)
+ComboBox
-TextBox (4x)
-Label (8x)
+Button (9x)
*GroupBox
+TabControl
-UserControl (dynamically added)
and so on. Other controls used within group boxes:
-ProgressBar
-RadioButtons
Now I have to reuse the first group:
*GroupBox
+GroupBox
-Combobox (4x)
-Label (8x)
+ComboBox
-TextBox (4x)
-Label (8x)
+Button (9x)
I just created a new user control and did a copy-and-paste. The arrangement was perfectly the same in the designer view on the control.
After dragging the user control back to the main form it was bigger and the group boxes, buttons, etc. were displaced.
Thanks in advance for your answer.
regards
Fabian
Linda Liu [MSFT] schrieb:
Hi Fabian,.
Do you create your project in VS 2005? If yes, do you use FlowLayoutPanel or TableLayoutPanel on the UserControl?
If you use FlowLayoutPanel or TableLayoutPanel on the UserControl and set its Dock property to Fill , when you put the UserControl onto the form and resize the UserControl or dock it to a border of the form, the layout of the UserControl is rearranged.
If you have used FlowLayoutPanel or TableLayoutPanel on the UserControl, I recommend you to set its Dock property to None.
If you haven't used FlowLayoutPanel or TableLayoutPanel on the UserControl, would you tell me what controls other than lable, textbox and button you have put on the UserControl?
I look forward to your reply.
Sincerely,
Linda Liu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
- Follow-Ups:
- Re: user control elements completely displaced when control is used on windows form
- From: Linda Liu [MSFT]
- Re: user control elements completely displaced when control is used on windows form
- References:
- Prev by Date: How to launch a ClickOnce application from a web page
- Next by Date: RE: How to create a graphics object of an entire Form?
- Previous by thread: RE: user control elements completely displaced when control is used on windows form
- Next by thread: Re: user control elements completely displaced when control is used on windows form
- Index(es):