Class | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version

## cell-style

This class is used to specify the style in which one of the cell types of a `calendar` widget is drawn. A `calendar` widget will create the instances of this class that it needs by default, though an application can completely replace a default style by creating a `cell-style` instance and passing it when creating the calendar widget. Alternately, an application can modify any of the existing `cell-style` instances of a calendar widget after the widget has been created.

The various `cell-style`s used by a `calendar` instance are accessed with the generic functions cell-style, cell-style-selected, cell-style-under-mouse, cell-style-current-date, and cell-style-other-month.

A cell-style has the properties background-color, foreground-color, border-color, border-width, and bold-text. Here are examples of the two alternate ways to specify a custom cell style.

    ;; Make a calendar widget, and then modify its built-in cell-style
    ;; for the date that's under the mouse to have blue text.
    (let* ((calendar (make-instance 'calendar)))
      (setf (foreground-color (cell-style-under-mouse calendar)) blue)
      calendar)

    ;; Create a calendar widget with a custom cell-style object
    ;; for the date that's currently under the mouse.
    (make-instance 'calendar
      :cell-style-under-mouse
      (make-instance 'cell-style
        :foreground-color (make-rgb :red 0 :green 128 :blue 192)
        :background-color light-gray   ;; nil means no background
        :border-color dark-blue
        :border-width 2                ;; nil or zero means no border
        :bold-text t))

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version