hmCal_Apply Stylesheet

hmCal_Apply Stylesheet(area;reference;type1;type2) -> error

Parameter          Type             Description
area               Longint      ->  hmCal area
reference          Longint      ->  stylesheet-id
type1              Longint      ->  type 1
type2              Longint      ->  type 2
error              Longint      <-  error-code

Contents

Description

The command hmCal_Apply Stylesheet sets an existing stylesheet for several objects. If you pass a 0 as the parameter reference, all objects are set to the standard font. There are the following objects, which can be set by a stylesheet:

Appointment header (1)

If you pass a 1 as the parameter type1 the stylesheet is applied to the appointment header. In parameter type2 you can pass the appointment-id, or a 0 for all appointments.

Appointment description (2)

If you pass a 2 as the parameter type1 the stylesheet is applied to the appointment description. In parameter type2 you can pass the appointment-id, or a 0 for all appointments.

Calendar descriptions (3)

If you pass a 3 as the parameter type1 the stylesheet is applied to all descriptions of the calendar (time/column descriptions). The parameter type2 is always 0.

Header of the month view (4)

If you pass a 4 as the parameter type1 the stylesheet is applied to the header of the month view. The parameter type2 is always 0.

User descriptions (5)

This type is unused. If you want to change user descriptions, you can use type 7 with the column reference -1.

Column header (6)

If you pass a 6 as the parameter type1 the stylesheet is applied to the header of the column. Type2 defines the column reference or 0 for all columns.

Column text (7)

If you pass a 7 as the parameter type1 the stylesheet is applied to the columntext. Type2 defines the column reference or 0 for all columns.

Example

The following example creates a new stylesheet and sets the month header in the month view:

C_LONGINT($vl_error)

$vl_error:=hmCal_hmCal_Add Stylesheet (hmCal;1;"Arial";20;Bold)
$vl_error:=hmCal_Apply Stylesheet (hmCal;1;4;0)