[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
color selected text
- To: info-mcl
- Subject: color selected text
- From: feng@.cs.umass.edu
- Date: 6 Jan 93 21:09:49 GMT
- Distribution: usa
- Newsgroups: comp.lang.lisp.mcl
- Organization: University of Massachusetts, Amherst
- Reply-to: feng@.cs.umass.edu ()
- Sender: news@dime.cs.umass.edu
I am implementing an interface. The interface is designed as a dialog
window, in which there are several items, one of them is an editable-
text-dialog-item. I want to color or change the font of the selected
text in the editable-text-dialog-item. The build-in method set-part-
color does not work for the selection range, but for the whole item.
Has anyone known some method that can make this change ?
For example, the following code makes a dialog window in which an
editable-text-dialog item and a button-dialog-item are enclosed.
The dialog-item-action of the button-dialog-item should color or
change the font of the selected text in the editable-text-dialog-item
text-item, once clicking on the button.
(setq interface
(make-instance 'dialog
:view-position 'centered
:view-size #@(250 250)
:view-subviews
(list
(setq text-item
(make-dialog-item 'editable-text-dialog-item
#@(5 20)
#@(100 180)
""
'nil
:allow-return t))
(setq coloring
(make-dialog-item 'button--dialog-item
#@(5 200)
#@(100 180)
"coloring selection"
#'(lambda (item) item))) ;;;I need the
;;;coloring method here
)))
Any suggestion is very welcomed, even without using the editable item.
However, both the table-dialog-item and sequence-dialog-item can not
be used for this purpose since them can not partially select a cell.
Thank you very much.
Fangfang Feng (fff in short)