Assembly.SetUserInterfaceItem Method

This method sets the state for the element user interface element. This method is useful to turn off features the users of your integration should not have access to and enable features users may have disabled.

Syntax

void SetUserInterfaceItem ( HotDocs.HDAUI element, bool enabled )

Parameters Description
element The user interface element to change. This parameter must be a member of the HDAUI enumeration.
 enabled Enables (true) or disables (false) the feature.

Example

The following Visual C# example begins an assembly after disabling three of the user interface elements:

public class ExampleCode
{
    static void Main()
    {
        HotDocs.Application app = new HotDocs.Application();
        HotDocs.Assembly asm = new HotDocs.Assembly();
         
        asm.TemplatePath = @"C:\Documents\HotDocs\Templates\demoempl.docx";
        asm.Visible = true;
         
        // Disable the answer file drop-down list
        asm.SetUserInterfaceItem(HotDocs.HDAUI.AUIANSWERFILEDROPDOWN, false);
         
        // Disable the New Answers command
        asm.SetUserInterfaceItem(HotDocs.HDAUI.AUIFILENEWANSWERS, false);
         
        // Disable the Open Answers command
        asm.SetUserInterfaceItem(HotDocs.HDAUI.AUIFILEOPENANSWERS, false);
         
        app.Assemblies.Add(asm);
    }
}