Jump to content

Indirect UI – embedded Help file


xod

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?

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

Yes, I already have that code generated from CodeLab but the .rtf text is not showed in the Help window. Only the error.

What I need to do?

Edited by xod
Link to comment
Share on other sites

Sorry, I misread your post. :roll:

 

Perhaps the Namespace is not correct?

Is the Default Namespace in your Project set to "Test01Effect"?

And is your file named "Test01.rtz"?

 

EDIT: Here's a screenshot, if that helps:

Spoiler

rtf-shot.png

 

  • Upvote 1

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to 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
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.

×
×
  • Create New...