Jump to content

Indirect UI – embedded Help file


xod
 Share

Recommended Posts

I saw on the BoltBait's site – beyond CodeLab –  how to embed an icon but does not explain how to embed the Help file.
If I Add Existing item and select the .rtf file then Embedded Resource nothing happens. The message showed in Help box is an error: System.ArgumentNullException: Value cannot be null.

// Change the effect's window title
            props[ControlInfoPropertyNames.WindowTitle].Value = "Test01";
// Add help button to effect UI
            props[ControlInfoPropertyNames.WindowHelpContentType].Value = WindowHelpContentType.CustomViaCallback;
            props[ControlInfoPropertyNames.WindowHelpContent].Value = "Test01Effect.Test01.rtz";

Maybe someone can help me. Thanks in advance.

Link to comment
Share on other sites

props[ControlInfoPropertyNames.WindowHelpContentType].Value = WindowHelpContentType.CustomViaCallback;

The CustomViaCallback enum means you're going to provide your own custom function to handle the help content.

 

CodeLab can generate example code for you:

Spoiler

codeLab-rtf.png

source-rtf.png

 

Or do you already have that code generated from CodeLab?

Link to comment
Share on other sites

My file have rtf extension not rtz but I don't understand why in the code generated from CodeLab have rtz.
The Namespace is correct.
Ok, I'll see tomorow what is happening. Now is late. In my country it is time 23:20.
Thank you for your help.

Link to comment
Share on other sites

Perhaps I don't understand what's going on, but in my VS projects, the help menu file always takes a name like Properties.Resources.Help, where the resource in the project is called Help. Likewise, the icon is Properties.Resources.Icon. They're defined (automatically by VS) in Properties>Resources.Designer.cs in code like,

internal static string Help {
            get {
                return ResourceManager.GetString("Help", resourceCulture);
            }

 

  • Upvote 1
Link to comment
Share on other sites

rtz is an rtf file that has been compressed.  CodeLab compresses the help files to save space.

 

You can use the following utility to compress your rtf file for embedding:

 

CompressV2.zip

 

(This was written by me. It compresses the help file the same way CodeLab does.  It can also uncompress a file.)

 

BTW, I don't want any bug reports on this utility. I wrote it for my own use and am sharing it now because I'm such a nice guy.

  • Upvote 3

Click to play:
j.pngs.pngd.pnga.pngp.png
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...