-
Dec 23rd, 2010, 12:41 PM
#1
Resizing form and controls
I have a form that sits on the user's desktop. It's only purpose is to display specific information about the computer. The layout is basically setup like this:
=========TITLE==========
= ITEM - ***......................=
= ITEM - ***......................=
= .......................=
= ITEM - ***......................=
= ITEM - ***......................=
=======================
I want to be able to give the user the option to display whatever data they choose. In doing so, I'd like the form to resize itself based on the how many labels are in the form and for the labels to align vertically.
Can anyone point me in the right direction? For the form, I was thinking I could get the location of the last label and offset it's size by the location, or something similar.
Thanks
CodeBank contributions: Process Manager, Temp File Cleaner
Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Dec 23rd, 2010, 01:09 PM
#2
Re: Resizing form and controls
You can use the Form's AutoSize and AutoSizeMode properties to have it grow. So if you programmatically add controls, it will automatically resize to show the newly drawn controls. I would set AutoSize = True and AutoSizeMode to GrowAndShrink.
-
Dec 23rd, 2010, 01:12 PM
#3
Re: Resizing form and controls
Originally Posted by Negative0
You can use the Form's AutoSize and AutoSizeMode properties to have it grow. So if you programmatically add controls, it will automatically resize to show the newly drawn controls. I would set AutoSize = True and AutoSizeMode to GrowAndShrink.
Ah. Gotcha. That should work then.
But what about the controls? I bet if I group them into panels, there's probably something that would allow me to align them.
CodeBank contributions: Process Manager, Temp File Cleaner
Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
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
|