Skip to main content
RSS feed Subscribe to feed


Skip Navigation LinksHome  Extending the Spotfire Platform  Creating Extensions to the Spotfire Platform  Creating a Tool  How to Create an Export Tool  Export Tool Feature: Configurable Border Widths Between Page Parts

©Spotfire 2011

Export Tool Feature: Configurable Border Widths Between Page Parts

Carefully define the correct borders and coordinates.

The AreaWithBorder help class is used to generate all areas. The visualizations, for instance, get the correct areas as follows:

AreaWithBorder visualCanvas = new AreaWithBorder(
    visualBounds.Left, visualBounds.Top,
    visualBounds.Width, visualBounds.Height);
visualHeading = new AreaWithBorder(
    0, 0, visualCanvas.InnerWidth, settings.VisualHeadingHeight);
sb.AppendFormat("<h3>{0}</h3>", visual.Title);
sb.AppendLine("</div>"); // end of visualHeading.
AreaWithBorder visualArea = new AreaWithBorder(settings.VisualAreaBorder,
    0, visualHeading.OuterHeight,
    visualCanvas.InnerHeight - visualHeading.OuterHeight); 
sb.AppendLine("</div>"); // end of visualArea.
sb.AppendLine("</div>"); // end of visualCanvas.

The border widths are stored as constants in HTMLPrintToolSettings. Some of them can easily be derived from the settings dialog if needed.