#1 - You can change the scope of the selected item by changing the PopupMenu labeled “Scope” in the properties inspector on the right. You can also change multiple items at once by selecting them and right-clicking, if you’ve only selected scopable(?) items then there will be a “Scope” item in the contextual menu.
#2 - Yes, if you save the project as Text you can view the code on the Window by opening the WindowName.xojo_code text file.