Marshal provides three options for implementation:

  1. Pure Code using an event handler (minimal changes)
  2. Marshal Button component (Button as visual component)
  3. App Inspector component (Marshal automatically starts with the application)

Pure Code

Implementing Marshal in pure code provides you with complete control for layout and build inclusion. Pure code does not require the design time packages in the IDE. This method requires no changes to the DFM file. The changes to the PAS files are:

  1. Add an entry to the implementation uses clause for the Marshal API class (ex. VCL.SE.RTTK.Marshal).
  2. Modify an event handler to call TSERTTKMarshalAPI.ShowMarshal.

**Sample is provided in the procedure MarshalCode in the samples below.

Use this option if your goals are to:

  • Control build inclusion / exclusion using conditional compilation with IFDEF statements.
  • Not introduce any new controls to existing forms
  • Not require design time components in the IDE 
  • Control the search path at the project level

Marshal Options are allowed using an overloaded constructor to control re-opening inspectors and form width and height.  Sample is provided in the procedure MarshalCodeWithOptions in the samples below.

VCL sample Marshal FNC Chart Demo - pure code VCL, FMX sample Marshal FNC Chart Demo - pure code FMX

Marshal Button Component

The button component is provided for quick implementation when you have design space on a form where you can easily add a button.

Use this option when:

  • Design space allows you to add the button (button can be set to visible = false using conditional compilation)

App Inspector Component

The app inspector component is a non-visual component for quick implementation when you want Marshal to show automatically every time you start your application.

Use this option when:

  • You would like to show Marshal on each startup
  • Prefer to re-open inspectors each time