RE: [PHP-GTK] Loading the X selection (e.g. Edit, Copy)
| From: | Steph | Date: | Tue, 08 Jun 2004 00:45:55 +0000 |
| Subject: | RE: [PHP-GTK] Loading the X selection (e.g. Edit, Copy) | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-4632@lists.php.net to get a copy of this message | ||
> On Tue, Jun 01, 2004 at 08:22:13AM +0300, Cosmin wrote:
> > You can put it in a hidden entry and the copy it to the clipboard
> > Something like this:
> > $entry = &new GtkEntry();
> > $entry->hide();
> > $entry->set_text('my text');
> > $entry->select_region(0, -1); //this selects the whole text
> > $entry->copy_clipboard();
>
> This works up to 2047 bytes. If the text in set_text() exceeds that
> length, it is truncated to 2047 bytes. I note that the apparent limit
> is one off a power of two.
>
> Guess 1: GtkEntry cannot take more than 2047 bytes.
>
> Guess 2: cut and paste needs the widget to be managed by an X window.
Guess 1 is probably correct, the maximum length for GtkEntry is set at
guint16 (DNS is b0rked locally at present so I've no way of double-checking
that).
Guess 2: I'm not getting you. I can copy or cut from EditPlus and paste
into GtkText because the clipboard is the same clipboard, and vice versa..
What is it exactly that you're trying to do?
- Steph
> --
> James Cameron mailto:quozl@us.netrek.org
> http://quozl.netrek.org/
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>