Next / Previous / Contents / Shipman's homepage

5. Standard attributes

Before we look at the widgets, let's take a look at how some of their common attributes—such as sizes, colors and fonts—are specified.

5.1. Dimensions

Various lengths, widths, and other dimensions of widgets can be described in many different units.

  • If you set a dimension to an integer, it is assumed to be in pixels.

  • You can specify units by setting a dimension to a string containing a number followed by:

    Table 3. Dimensional units

    cCentimeters
    iInches
    mMillimeters
    pPrinter's points (about 1/72″)