I've worked out how to do this, with luck it works for what you're trying to do.
Here is an example:
(defun color-text-field (ink) (let ((pane (find-pane-named *application-frame* 'text-field))) ;; The Goatee screen area keeps track of its own foreground color. (setf (goatee::foreground-ink (climi::area pane)) ink) ;; The cursor is still drawn in foreground ink of the sheet-medium. (setf (medium-foreground pane) ink) ;; Now force repaint of the sheet (repaint-sheet pane (sheet-region pane))))
(defun red-text-field (gadget) (color-text-field +red+))
(defun green-text-field (gadget) (color-text-field +green+))
(define-application-frame colored-text-editing () () (:panes (text-field :text-field) (red-button :push-button :activate-callback 'red-text-field :label "Redify") (green-button :push-button :activate-callback 'green-text-field :label "Greenicate")) (:layouts (default (vertically () text-field (horizontally () red-button green-button)))))
On 4/19/05, Paolo Amoroso amoroso@mclink.it wrote:
How can I change the color of the text displayed in a text field? Does the CLIM specification allow this?
Paolo
Lisp Propulsion Laboratory log - http://www.paoloamoroso.it/log _______________________________________________ mcclim-devel mailing list mcclim-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/mcclim-devel