Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Replaces the content of the TextBuffer object with the content of the clipboard.
Syntax
public boolean fromClipboard()
Run On
Called
Return Value
Type: boolean
true if the replacement was successful; otherwise, false.
Examples
{
TextBuffer txtb = new textBuffer();
FileIoPermission perm;
#define.ExampleFile(@"c:\test.txt")
#define.ExampleOpenMode("w")
// Set code access permission to help protect the use of
// TextBuffer.tofile
perm = new FileIoPermission(#ExampleFile, #ExampleOpenMode);
perm.assert();
if ( txtb.fromClipboard() )
{
// Got text from clipboard - save it to file
txtb.toFile(#ExampleFile);
}
// Close the code access permission scope.
CodeAccessPermission::revertAssert();
}