Re: Getting the selection from GtkText




Andreas Leitner <leitner@eiffel.com> writes:

> Anders Melchiorsen wrote:
> > 
> > Isn't there a simple way to get the selection from a GtkText widget? I
> > am thinking of something with an interface as simple as
> > gtk_editable_select_region() but I cannot seem to find anything?
> 
> If you want to know whether there is a active selection in the widget
> use
> --
>   guint      has_selection : 1;
> --
> from GtkEditable (GtkText "inherits" from GtkEditable).

What this variable says is whether the editable widget owns
the global X selection. Which may or may not be what one
is interested in. (This is the blue selection in the default
color scheme). If this is not set, there may still be
a selection that is not the global X selection (the gray
selection in the default color scheme).
 
Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]