Collapsing code

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 6 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
ErnieB
Posts: 56
Last visit: Mon Dec 19, 2022 2:09 am

Collapsing code

Post by ErnieB »

SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.145

I have an issue collapsing code as follows (unless there is another short cut key I am not aware of)

if I have code like the following, I cannnot collapse it in one go e.g. collapse both the functions and region. In fact when function are withina region I can only seem to collapse on function at a time. This is a big pain the the bum as I have many functions and want to collapse them all at once. When I expand the region I often find my function expanded and want to be able to collapse all of the functions down in one go.

Please advise, thanks

#region

function test
{
#asfasdasdasdasd
#asdasdasdasdsa asdasd

}


function test2
{
#asfasdasdasdasd
#asdasdasdasdsa asdasd

}

#endregion
cody m

Re: Collapsing code

Post by cody m »

It is not currently possible to collapse all functions in a specific region when that region is collapsed, however you can use the collapse all command to collapse everything in your script.

Here is some more information on the collapse all command.
https://info.sapien.com/index.php/how-t ... o/collapse

I have also added this functionality to our list of feature requests for future releases of PowerShell Studio.
User avatar
ErnieB
Posts: 56
Last visit: Mon Dec 19, 2022 2:09 am

Re: Collapsing code

Post by ErnieB »

OK thanks Cody, I will read through the link you sent me.

Ernest
This topic is 6 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.