BoltBait.com

CodeLab Tutorial Part 6 - Adding Help

How to use CodeLab to add help to your plugins!




If you haven't already done so, please go back and review the following:

Part 1 - Simple
Part 2 - Intermediate
Part 3 - Complex
Part 4 - Odds & Ends
Part 5 - Beyond CodeLab

Back? OK, good. Now that you've mastered those lessons, you're probably making some fairly complex effects. Maybe it is time to add a help file to your effect to aid your users in getting the most out of your effect.

Part 6 - Adding Help

Starting with Paint.NET version 4.0.6, effects can have help available:



Starting with CodeLab v2.6, help can be added to an effect in 3 different ways:

1) Use the comment method. Add to your script:

// Help: This is the help text.

All help content must be on one line. Use \t for tab and \n for new line.

2) Save your help text in a Rich Text Format file with the same name as your effect. MyEffect.cs would have a help file MyEffect.rtf. These two files must be saved in the same directory. This is similar to how MyEffect.png is automatically picked up for the icon. (Overrides #1) Rich Text Format files can be created in Wordpad, Microsoft Word, or the built-in editor on the Save as DLL screen as shown below.

3) Enter your text on the Save as DLL screen. (Overrides #1 & #2)

The Save as DLL screen has a preview button (?), editor, and instructions on how to create your help content.



The editor has a save button (looks like a picture of a floppy disc) to create the files used in "2)" above.


The File New templates also have a new option for coding your own custom help system and will code a stub to get you started.


Help content can take 4 forms:

1) None. If no help text is entered, no ? button will be added to your effect.

2) Plain text (including tabs and returns). This will be displayed in a modal message box.

3) URL. If your help text is a URL, it will be opened in a non-modal browser window.

4) Rich Formatted Text. This will be displayed in a modal pop up form with a rich text format control. All RTF features are supported including pictures. All URLs included are automatically clickable and open in a new browser window.


By the way, if you are curious what code is being generated, you can always select the "view code" button on the Save as DLL screen.


Final Thoughts

In this tutorial, I haven't really talked about the help content. I'll leave that up to you. After all, YOU are the expert in your own effect. My best advice to you would be to place yourself in your user's point of view and ask yourself what questions could your user's have. Your help text should answer those questions.

If you've made it this far and would like to say, "thank you" for all the hard work that went into collecting and developing this series, you can buy me a beer.




More Information

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



 

 
 

News



CodeLab 6.12 Released
(February 11, 2024)
This latest release of CodeLab for Paint.NET includes the ability to write GPU accelerated plugins.
More...

Double-Six Dominoes 3.1
(May 10, 2021)
This long-awaited refresh of the most popular dominoes game on Download.com is now available!
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...