Re: how do I tell which widget has the selection
- From: Mihai Bazon <mbazon websci ro>
- To: gtk-app-devel-list gnome org
- Subject: Re: how do I tell which widget has the selection
- Date: Thu, 12 Jul 2001 16:19:09 +0300
rob wrote:
I have a window which contains mostly gtkEntry widgets and a toolbar
with the usuale cut copy paste buttons. When the user clicks cut/copy i
want to cut/copy text from widget that has the selection (i.e has the
blue highlighted look) to the clipboard but I can't figure out how to
tell what (if any) widget has it.
Anyone know?
Not sure, but here's how I'd do it..
Catch focus_in_event and focus_out_event for those GTK_ENTRY-es, and
keep a global var GtkWidget* to be always a pointer to the widget that
has the focus. You will use that pointer as the widget to which CUT /
COPY / PASTE operation refers.
--
Mishoo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]