home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!caen!nic.umass.edu!dime!feng
- From: feng@.cs.umass.edu
- Newsgroups: comp.lang.lisp.mcl
- Subject: color selected text
- Message-ID: <58350@dime.cs.umass.edu>
- Date: 6 Jan 93 21:09:49 GMT
- Sender: news@dime.cs.umass.edu
- Reply-To: feng@.cs.umass.edu ()
- Distribution: usa
- Organization: University of Massachusetts, Amherst
- Lines: 43
-
-
- 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)
-