BoltBait.com

CodeLab Editor Menus

How to use the CodeLab editor


Here, all of the CodeLab editor menus and buttons are described.


File > New (Ctrl-N)

This command clears out your current script and replaces it with the default script.

If your current script was not saved, you will be prompted.


File > Open (Ctrl-O)

This will open the standard Windows open dialog box. You can select a .cs file for editing.

When you open a file, the name of the file is shown in the CodeLab title bar.


File > Save (Ctrl-S)

This will open the standard Windows Save As... dialog box. When you pick a name and click OK, CodeLab will save your current script to that file. It is important that your filename uses alphanumeric characters only (no spaces or other special symbols) as this name will be used for your effect's internal namespace when building a DLL of your effect.

Saving a file updates the filename shown in the CodeLab title bar. This is important because when you build a DLL file, this is the name that the DLL file will have.


File > Save As DLL (Ctrl-B)

Use this option when you are happy with your effect and want to make it a perminant part of your Paint.NET (or you want to share your effect with your friends). Be sure to save your script file (Ctrl-S) before saving as a DLL.

See this page for more details on creating DLL files for use with Paint.NET.


File > User Interface Designer (Ctrl-I)

Use this option before you start editing your Render function to design the user interface controls your effect will have.

See this page for more details on using CodeLab's UI designer.

See this page for more details on writing UI code in the Render function.


File > Exit

This will close the editor without building a DLL or even applying your effect to the current selection.


Edit > Select All (Ctrl-A)

This command selects your entire script within the code window. From there, you can...


Edit > Cut (Ctrl-X)

This command deletes the currently selected code in the editor window and places a copy of the deleted code onto the clipboard.


Edit > Copy (Ctrl-C)

This command places a copy of the currently selected code in the editor window onto the clipboard. The currently selected code is NOT deleted.


Edit > Paste (Ctrl-V)

This command replaces the current selection with the code from the clipboard.


Edit > Indent (Tab)

If you have lines of code selected in the editor window, pressing the tab key will indent those lines by four spaces.

If only a partial line is selected, after pressing the tab key, the entire line will become selected.


Edit > Unindent (Shift-Tab)

If you have lines of code selected in the editor window, pressing the shift-tab key will unindent those lines by four spaces.

If only a partial line is selected, after pressing the shift-tab key, the entire line will become selected.


View > Large Font (Ctrl-L)

If you have trouble seeing the code in the code window because it is too small, large font mode will increase the size of the text in the code editor window to 125% of normal size.

Select the option again to return the code to normal size.


View > Transparency

By default, the CodeLab window is not transparent at all. If you would like to be able to see through the code window to observe the effect your script is having on the current selection, use this option to modify CodeLab's transparency level. You may select 50% (nearly transparent), 25%, 10% (barely transparent), and 0% (not transparent).


Help > Help Topics

This command will open a web browser and take you to the CodeLab Help page.


Help > Check for updates

This command will open a web browser and take you to the CodeLab page.


Help > About

This command shows the About box which includes the version number and copyright message for CodeLab.


Build Button

The build button can be used to compile your current script and run the effect on your current selection.

When you pause typing in the code window, CodeLab presses the Build button for you.

If build errors occur, they will be listed in the box to the left of the build button. Click on the individual build errors to highlight the portion of the code that caused the error.

Due to errors in your code (like mismatched { or }) the error may be flagged outside of your code. Please check the structure of your script to correct those types of errors.


OK Button

When you are happy with your effect, press the OK button to finalize the effect to your current selection.


Cancel Button

If you do not like your effect, press the Cancel button to close the CodeLab editor window WITHOUT applying any changes to your original image.


More Information

Here is some more information that you may find useful:
CodeLab Effects Design Overview
Designing a User Interface for Your Effect
Sample Code for User Interface Elements
Building a DLL File
CodeLab Help File
Check for CodeLab Updates
Learn C#

 

News


CodeLab 2.19 Released
(April 15, 2017)
This latest release of CodeLab for Paint.NET includes the Notepad++ editor and a full WYSIWYG help editor.
More...

HTML Editor 1.5 Released
(March 31, 2016)
This latest release is a complete rewrite adding a wysiwyg editor mode and a much improved UI.
More...

Double-Six Dominoes 3.0
(September 25, 2015)
This long-awaited refresh of the most popular dominoes game on Download.com is now available!
More...