Building Dynamic .NET Controls with Windows Forms
page 1 of 6
Published: 07 Sep 2007
Abstract
This article demonstrates how to load Controls dynamically, as well as position and align them according to their text length.
by Vishal Kumar Patil
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 16188/ 172

Introduction

In many projects we encounter the situation where we need to load controls dynamically on the form, as well as position and align them properly. Generally we do this when we are not sure about the number of fields to be displayed and their text size. Imagine a situation where there are several modules and for each module a pop dialog with different field names should be displayed. Instead of creating an individual popup dialog for each module, we can create one popup dialog and based on module name, pass the field names to the pop dialog which will dynamically load, position and align controls on it. This helps take advantage of flexibility and gives us the power of adding controls at runtime.

In the below example I will demonstrate how to achieve this.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 7 and 2 and type the answer here:

User Comments

Title: ABCD   
Name: EFGH
Date: 5/15/2008 8:48:45 AM
Comment:
Good

Product Spotlight
Product Spotlight 






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2009 ASPAlliance.com  |  Page Processed at 11/21/2009 9:49:51 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search