Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MoverControl changes
Message
 
To
21/09/2007 14:20:54
Jeff Corder
Ambit Technologies, LLC
Missouri, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01256002
Message ID:
01257571
Views:
20
Jeff,

>When I dropped the control in my form, I placed it inside a Tab Control. When I close the form and reopen it (design mode, not running the program), the controls on the tab are rearranged. There are three tabs on the TabControl and it doesn't make any difference which tab I drop the mmMoverControl on, tabs 1 and 2 are rearranged. If I drop it on the TableLayoutPanel on the form, I don't see any rearranging. Of course the original mmMoverControl causes no problems at all.
>
>My thoughts are:
>- You can't use TableLayoutPanel in a control (but I couldn't find any warnings)
>- I'm too many container levels deep, but that seems unlikely
> Form->TableLayoutPanel->TabControl->TabPage
> ->CustomControl->TableLayoutPanel->Controls
>

This is the ugliness that is currently the state of affairs in Windows Forms (it works much better in WPF). The problem is the order of code in InitializeComponent. The form is the last object to be resized which causes your control to resize--this is counterintuitive, but it's the way that it works. There is no great solution to this problem--one way around it is to set anchoring settings at run tine--ouch!

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform