Convert regular form to one with tabs?

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
User avatar
Chris.Ediger
Posts: 42
Meble kuchenne na zamówienie - na wymiar - Wrocław
Joined: Tue Oct 24, 2017 9:33 am

Convert regular form to one with tabs?

Post by Chris.Ediger »

I have a tool that I'd like to convert to a tabbed form. Is there a way to import or copy over from my regular form to the tabbed form?

jvierra
Posts: 14358
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Convert regular form to one with tabs?

Post by jvierra »

Just select all controls and copy to clipboard then paste onto the tab of choice.

You will have to separately copy the event code and manually reconnect the events.

An easier method is to make a copy of the form and just add a tab control and copy and paste on the same form. This sill not disturb the exisiting code and linkage.

User avatar
Chris.Ediger
Posts: 42
Joined: Tue Oct 24, 2017 9:33 am

Re: Convert regular form to one with tabs?

Post by Chris.Ediger »

I think I understand now

jvierra
Posts: 14358
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Convert regular form to one with tabs?

Post by jvierra »

Make copy of PSF file to new name. Make form large enough to add a tab control away from all current controls. Select all controls but not tab. "Ctrl-X' to cut existing controls. Select client rea of tab. Be sure client are is selected and not just the tab. 'Ctrl-V' to paste cut controls. Move and resize tab control.

YOU now have all controls on a tab.

rohit31
Posts: 1
Joined: Sat Apr 04, 2020 2:19 am
Contact:

Re: Convert regular form to one with tabs?

Post by rohit31 »

Excellent thread...!!!

tocnaza
Posts: 1
Joined: Sun Mar 03, 2019 10:33 am

Re: Convert regular form to one with tabs?

Post by tocnaza »

Thanks Chris

Locked