Product, version and build: latest available build
32 or 64 bit version of product: 64
Operating system: W2K12R2
32 or 64 bit OS: 64
PowerShell Version: 5.0.10586.117
DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
Hi,
I'm looking for a guide or example of making a resizable form. So a form with (rich)textboxes, datagrids, pictureboxes, tabcontrol etc which resizes correctly.
I guess you can "anchor" items but I'd like to see that behaviour on an example form and know the settings for it.
Thanks for your input.
S.
Resizable form
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Resizable form
[TOPIC MOVED TO THE POWERSHELL GUIS FORUM BY MODERATOR]
For more information on Anchoring, please refer to the following article:
http://info.sapien.com/index.php/guis/g ... nd-methods
Go to info.sapien.com to read all our articles on GUI scripting:
http://info.sapien.com/index.php/guis
For examples, you can refer to the form templates that are included in PowerShell Studio.
For more information on Anchoring, please refer to the following article:
http://info.sapien.com/index.php/guis/g ... nd-methods
Go to info.sapien.com to read all our articles on GUI scripting:
http://info.sapien.com/index.php/guis
For examples, you can refer to the form templates that are included in PowerShell Studio.
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Resizable form
I had a moment between tasks so I whipped up this sample, it's not useful in any way other than showing some use of the anchor property.
If you select the DataGrid at the top portion of the GUI you'll notice the anchor is set to Left, Top, and Right. This means that if either one of those sides of the form moves, the size of the DataGrid is adjusted to be "anchored" to that side. The reason the bottom isn't anchored is because then if you were to make the form taller, the DataGrid would grow behind the RichTextBox, go ahead and try it for yourself.
If you select the RichTextBox at the bottom it has all four sides set to anchor. This is so whenever you make the form taller, as mentioned in the previous point, the bottom of the control grows along with it.
I hope this at least helps to point you in the right direction.
If you select the DataGrid at the top portion of the GUI you'll notice the anchor is set to Left, Top, and Right. This means that if either one of those sides of the form moves, the size of the DataGrid is adjusted to be "anchored" to that side. The reason the bottom isn't anchored is because then if you were to make the form taller, the DataGrid would grow behind the RichTextBox, go ahead and try it for yourself.
If you select the RichTextBox at the bottom it has all four sides set to anchor. This is so whenever you make the form taller, as mentioned in the previous point, the bottom of the control grows along with it.
I hope this at least helps to point you in the right direction.
DevinL
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Resizable form
No problem! I'm glad it helped out.
If you have any further issues, please don't hesitate to post again.
If you have any further issues, please don't hesitate to post again.
DevinL
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.