|
-
Oct 13th, 2005, 01:44 PM
#1
Thread Starter
Addicted Member
Dynimically changing the size and location of controls
Hi All
i have dynimically created label and textbox in a panel, i want to resize, and location of the controls dynimically. can any body please provide a solution for this.
-
Oct 13th, 2005, 06:02 PM
#2
Re: Dynimically changing the size and location of controls
textBox1.Location = new point (100,100);
textBox1.Size = new Size (10,100);
textBox2.Size = textBox1.Size;
etc etc
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Oct 13th, 2005, 08:26 PM
#3
Re: Dynimically changing the size and location of controls
Are you saying that you have created them in one section of code but you want to change their properties later? You need a reference to any object to edit its properties, so you either need to save references to those controls in class-level variables when you create them or get a reference through the Controls property of the form. If you want to use the second method you would need to set the Name property of the controls when you create them so that you can identify them later when you're searching for them. I'd suggest using a class-level array or collection to store references to the dynamically craeated controls. That way you can easily access them at any later stage.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|