Skip to content

CalendarThemeHeaderBackground Object

Description

Header background images.

For a list of all members defined in this module, see CalendarThemeHeaderBackground Members.

Object Model

Object Model
Child Diagram
Bitmap Borders

Remarks

The header background is drawn in two steps:

  1. Fill the header rectangle using the base color.
  2. Draw the pattern bitmap in the header rectangle (the bitmap may be an alpha bitmap as well).

For the majority of Calendar headers, the default bitmaps are 'grey' alpha bitmaps. When they are drawn over a 'base color', we get these nice headers. We can simply change the 'base color' (without touching the bitmap) to change the header color style.

The CalendarThemeHeaderBackground contains two properties:

  • BitmapID: Contains the ID of a bitmap from CalendarThemeOffice2007.ImageList. Standard (default) bitmaps have negative IDs like -100, -101. Custom bitmaps should have positive IDs. An ID of zero (0) is used to set 'no bitmap'.

  • BitmapBorders: The template bitmap has a constant size and is resized to the header rectangle when drawn. This member contains bitmap margins that are not resized. For example, if a bitmap for a header has a 1-pixel frame around it, we must set BitmapBorders as (1, 1, 1, 1). This will prevent resizing of the border frame width. For any header size, the border will be 1 pixel wide.

The header bitmap is divided into six equal height pieces:

  • The first triad is for a normal header.
  • The second triad is for a hot header (when the mouse is over a header).

Header Piece Usage

  • The first piece (in each triad) is used for the left header (in the header row).
  • The second piece (in each triad) is used for the middle header (in the header row).
  • The third piece (in each triad) is used for the right header (in the header row).

When there is only one header in a row:

  • The left header part is drawn using the left half of the first piece.
  • The right header part is drawn using the right half of the third piece.

Example

An example of the header background bitmap is shown below:

Header Background Example

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.