On this Page

    domObj.fillObject

    (Merge only)

    Fill out an object such that it uses up its full width.

    Syntax

    domObj.fillObject(text)

    Returned Value 

    Nothing directly, but the domObj is updated.

    Parameters

    text is a string, most typically the "." string to be appended to the domObj's current value until the domObj fills up its entire width.

    Description

    Typically used for a Table of Contents where one wants dots (......) to extend from the end of the text through to its corresponding page number. It might be used to fill out a cheque amount with "*".

    Example

    Imagine a Table of Contents such as:

    ...
    2.1 Best Books Ever..........................................................23
    2.1.1  Moby Dick.............................................................24
    2.1.2  The Island............................................................26
    ...

    It's no easy matter to know how many dots to add when dealing with proportional fonts.

    // When this refers to an object that holds the text for a line in a Table Of Contents
    this.fillObject(".");