| Allegro CL version 6.2 Unrevised from 6.1 |
Arguments: window object
Pastes object into window,
replacing the object that is currently selected in the window, if any.
If object is nil
, the
object of the appropriate type that is on the clipboard, if any, is
pasted instead.
Built-in methods allow pasting a string into a text-edit-pane
, editable-text
, multi-line-editable-text
, rich-edit-pane
, or
typable combo-box
, and allow pasting a
pixmap into a bitmap-pane
or drawable-pane
. If an application is
to use paste-selection or paste-command with other
types of windows, it should add paste-selection methods that add
the pasted object to the window in some way.
To paste a plain-text string into a rich-edit-pane
, pass the string
directly to paste-selection. It will be
inserted using the paragraph and character formatting that exists at
the insertion point in the control. For example:
(paste-selection my-rich-edit-pane "Unformatted Text")
To paste a rich-text string, on the other hand, first call clipboard-object (or
push-lisp-clipboard) to first post
the string as rich text onto the clipboard, and then call paste-selection, passing
nil
as the object
argument to paste the value that's on the clipboard. This will paste
the string as rich text. For example:
(setf (clipboard-object :rich-text) (plain-to-rich-text "Big and Bold" "Arial" 24)) (paste-selection my-rich-edit-pane nil)
A rich-text string should not be passed directly to paste-selection, because in some
older versions of Windows it would paste the rich text control string
rather than the rich text that it encodes, whereas some newer versions
of Windows would paste the formatted rich text. (setf
rich-edit-range) may alternately be called to insert plain or
rich text into a rich-edit-pane
. To insert text into
a rich-edit
control, insert it into the window of the control.
See cg-rich-text.htm for information about rich text editing in Common Graphics.
Copyright (c) 1998-2002, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 6.2. This page was not revised from the 6.1 page.
Created 2002.2.26.
| Allegro CL version 6.2 Unrevised from 6.1 |