ClassPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
This page is new in 10.0.

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-styles 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-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page is new in the 10.0 release.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
This page is new in 10.0.