Remove Panel in PowerShell Studio 2019?

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
Isaac99
Posts: 17
Last visit: Thu Apr 02, 2020 3:14 am

Remove Panel in PowerShell Studio 2019?

Post by Isaac99 »

I have created a form in Powershell Studio 2019 from a Blank Form.
I added textboxes, richtext boxes, datagrids and drop downs, all working fine, looks great.
Finally I drew a panel around the whole lot and added a background image to the panel.
I now want to remove the panel but in doing so it removes EVERY item that I had created previously within its bounds.
I can't see a way of unlinking the panel from every other object in the form. I can't move it off to the side as it drags every item with it.
Other panels I have created in which I have docked datagrids, I just undock the datagrid and I can delete the panel.
With the panel that goes around the whole perimeter of the form I just can't get rid of it.
Any ideas?
thanks

User avatar
mxtrinidad
Posts: 399
Last visit: Tue Jan 19, 2021 10:16 am

Re: Remove Panel in PowerShell Studio 2019?

Post by mxtrinidad »

I would suggest to add all controls first, then add the panel last. Right-click on the panel and select "Send To Back".
This way if you delete the panel and all controls stays in the form.

jvierra
Posts: 14762
Last visit: Mon Apr 19, 2021 4:16 pm
Answers: 9
Has voted: 3 times
Been upvoted: 7 times

Re: Remove Panel in PowerShell Studio 2019?

Post by jvierra »

Copy the contents of the panel to the clipboard or drag them off the panel then delete the panel and replace the objects. This is how it is done in PSS, Visual Studio and most other IDE forms designers.

Isaac99
Posts: 17
Last visit: Thu Apr 02, 2020 3:14 am

Re: Remove Panel in PowerShell Studio 2019?

Post by Isaac99 »

@jvierra - thank you very much, that worked a treat

Locked