Lisp HUG Maillist Archive

default values for backgrounds and foregrounds

Hi,

when a pane object is instantiated without values given for :background and :foreground some defaults values are taken instead.

My question is whether or not it is possible to *dynamicaly* set this values, i.e.

(let ((*foreground* :white) (*background* :red))
	(make-instance 'row-layout
	:description (list
			(make-instance 'title-pane :text "whatever")
			(make-instance 'title-pane :text "some more"))))

Is this possible?, I mean would this set the foregrounds and backgrounds of all three object to the dynamic values?

Guenther



Re: default values for backgrounds and foregrounds

Guenther Schmidt <gue.schmidt@web.de> writes:

> Is this possible?, I mean would this set the foregrounds and backgrounds of all three object to the dynamic values?

At least you can do this yourself, e.g. by subclassing panes and adding
default-initargs, e.g.

(defclass my-title-pane (title-pane)
  ()
  (:default-initargs
   :background *my-dynamic-bg*
   :foreground *my-dynamic-fg*))

-- 
  (espen)


Updated at: 2020-12-10 08:58 UTC