Collapsible Code Regions

If your method contains enough code to need regions you should split it up.

4 Likes

Region is widely used to define a part of a draw environment (Canvas in Xojo).

That is why I do not understand when I read the title and OP text.

Now, there are good suggestions above:

reformat your code to extract what can be done in Methods and Functions, then your need for this feature will vanish.

You also can add a second window for your project if you need to read part of your code: read the File Menu top 2 or 3 MenuItems.

At last, you can print (to paper or pdf) your code and read it while adding code in the Code Editor.

Xojo have enough work on their plate (as said differently above).

My only complaint about the IDE’s existing code folding is that it’s not persistent - if you click away to have a look at another method, when you go back it’s unfolded.

4 Likes

yes, that one is annoying :face_with_raised_eyebrow:

Even worse, if you at any time perform an Undo, all code is unfolded. This can cause a lot of grief if you’re not paying close attention because you may continue editing a wrong code branch, and is a bug imo (2021r2.1).