Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resizing Automatically...BUG????
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00912903
Message ID:
00913157
Views:
27
Thanks Kevin!
I will let you know if it works...i am sure it will though.

>Shawn,
>
>This is actually a VS .NET / Windows Forms problem, and it all boils down to this: The last object to be resized is the form itself. Here's the details:
>
>When the form instantiates, the code that instantiates and resizes the TabControl fires first, then the code that instantiates the TabControl’s contained controls fires next…INCLUDING the code that anchors the TabControl to the form. Next, code that resizes the form is fired! Since the TabControl is already a larger size than the form (because it was sized first), when the form is resized, the TabControl is resized proportionately, making it larger than it should be (and in fact, too large for the containing form).
>
>I tried lots of different workarounds for this, but since you can’t control what the VS .NET designers are doing, the only way I could get around it is to set the anchoring property of the TabControl AFTER the form is already resized.
>
>I put this code in the form’s constructor AFTER the call to InitializeComponent:
>
>
this.TabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
>         | System.Windows.Forms.AnchorStyles.Left)
>         | System.Windows.Forms.AnchorStyles.Right)));
>
>Since the TabControl is not anchored until after the form is resized, it works like a charm.
>
>Regards,
Shawn Dorion
Geo Sektor Dot Com
Website: http://www.geosektor.com

Web Hosting Plans
Visit : http://WebHosting.Applications4u.com/
Previous
Reply
Map
View

Click here to load this message in the networking platform