move a control from a panel by selecting the correct location

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
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.
Locked
hammersxo
Posts: 1
Joined: Fri Aug 14, 2020 8:20 am

move a control from a panel by selecting the correct location

Post by hammersxo »

Hi, I have set up a lot of controls directly on the windows form and now I need to create screens. Instead of using multiple forms, I want to use Panels. How do I point each of my controls (text boxes and buttons) to the new panel instead of the form directly using Powershell Studio GUI layout. When I copy paste, things break.

User avatar
brittneyr
Site Admin
Posts: 637
Joined: Thu Jun 01, 2017 7:20 am
Answers: 8
Been upvoted: 6 times

Re: move a control from a panel by selecting the correct location

Post by brittneyr »

[Topic moved to PowerShell GUIs by moderator]
Brittney Ryn
SAPIEN Technologies, Inc.

jvierra
Posts: 14667
Joined: Tue May 22, 2007 9:57 am
Answers: 5
Has voted: 1 time
Been upvoted: 5 times
Contact:

Re: move a control from a panel by selecting the correct location

Post by jvierra »

What are "screens". Controls can be removed form their container and added to any other container. Controls are always in a "ControlCollection" property of any form or control. The container have both "Add" and "Remove" methods.

See: https://docs.microsoft.com/en-us/dotnet ... etcore-3.1

Locked