[Gtk-sharp-list] Clipboard protection level error

Dan Winship danw at novell.com
Fri Jul 1 09:30:28 EDT 2005

On Thu, 2005-06-30 at 17:25 -0500, Mike Storm wrote:
> Hi all,
> I'm trying to create some simple cut/copy/paste buttons for my little
> text editor, but documentation on the web seems rather sparse.
> Whenever I try to do this:
> Clipboard clipboard = new Clipboard();
> it gives me this error:
> parser.cpp(51) error CS0122: 'Gtk.Clipboard.Clipboard' is inaccessible
> due to its protection level

You can't create a clipboard directly, you have to call
Gtk.Clipboard.Get() or Gtk.Clipboard.GetForDisplay() to get one of the
standard ones.

f-spot shows how to use this (in src/MainWindow.cs). I'd give a link to
the source code, but ViewCVS on cvs.gnome.org seems to be broken right
now after the migration. Try googling for Gtk.Clipboard.Get and

-- Dan

More information about the Gtk-sharp-list mailing list