Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MoverControl changes
Message
 
À
21/09/2007 14:20:54
Jeff Corder
Ambit Technologies, LLC
Missouri, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01256002
Message ID:
01257571
Vues:
18
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform