[Gtk-sharp-list] gtk.textbuffer

Daniel Morgan monodanmorg at yahoo.com
Sun Dec 18 14:16:40 EST 2005

Maybe you could provide some source.
  I think typical keys on Unix:
  Ctrl-C for Copy
  Ctrl-X for Cut
  Ctrl-V for Paste
  However, if you want to programmatically copy text into the clipboard:
  You could have menu in your application with Cut, Copy, and Paste.  Copy would:
  TextIter start_iter, end_iter;
  if (textView.Buffer.GetSelectionBounds (out start_iter, out end_iter) == true) {
      string text = textView.Buffer.GetText(start_iter, end_iter, false);
      SetClipboardText (text);
  public void SetClipboardText (string text) 
  {            Clipboard.GetForDisplay(Display.OpenDefaultLibgtkOnly(),Gdk.Atom.Intern("CLIPBOARD",true)).Text  = text;

M R Wheeler <service at gasman.biz> wrote:  i'm new to gtk-sharp
re linux mono

i have managed create and get a gtk_sharp app running, which queries my 
mysql database
i have managed to display the results to a gtk.TextView-TextBuffer.

What i cant do is retreive text, that has been highligted for copy, from 
the TextView--Textbuffer to a string

Can any body help with an example


Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20051218/4b945f86/attachment.html

More information about the Gtk-sharp-list mailing list