|
-
June 22nd, 2012, 05:22 PM
#1
resizing controls by percent
Hello,
Please have a look at the screen capture below.
SafeguardRowUserControl.jpg
What I have here is a line up of textboxes and a couple combobox at the right end. They are all children of a UserControl.
What I would like to do is allow for the UserControl to be horizontally resized and have the textboxes and comboboxes resize according to percentage. Whatever percentage they are now (as seen in the screen capture), they should maintain that percentage. So, for example, the left-most combobox is about 8% of the entire width of the UserControl as you can see. If the UserControl was stretched to twice its current size, the combobox should also stretch to twice its size, thereby remaining at 8% of the UserControl's width.
How can I do this?
I'm working in Visual Studios 2008.
-
June 26th, 2012, 03:02 AM
#2
Re: resizing controls by percent
Use Anchor properties of controls
-
June 26th, 2012, 09:37 AM
#3
Re: resizing controls by percent
control1.width=usercontrol.width*.08
...
that should do it.
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
|