[10554] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: ANNOUNCE: GtkConsole 0.0.1
daemon@ATHENA.MIT.EDU (Thomas Mailund Jensen)
Mon Nov 30 16:33:40 1998
To: gtk-list@redhat.com
From: Thomas Mailund Jensen <mailund@daimi.au.dk>
Date: 30 Nov 1998 22:33:05 +0100
In-Reply-To: Lyndon Drake's message of "Tue, 1 Dec 1998 09:14:26 +1300"
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
>>>>> "L" == Lyndon Drake <lyndon@stat.auckland.ac.nz> writes:
L> PS: How can I find the start and end of the selected text in a
L> GtkText widget? I need to prevent deletions of text outside the
L> input area in GtkConsole.
The selection? Get it from the editable superclass
if (GTK_EDITABLE (text)->has_selection) {
from = MIN (GTK_EDITABLE (text)->selection_start_pos,
GTK_EDITABLE (text)->selection_end_pos);
to = MAX (GTK_EDITABLE (text)->selection_start_pos,
GTK_EDITABLE (text)->selection_end_pos);
g_print ("selction is from %d to %d\n", from, to);
}
/mailund
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null