Re: [gtk-list] ANNOUNCE: GtkConsole 0.0.1
- From: Thomas Mailund Jensen <mailund daimi au dk>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] ANNOUNCE: GtkConsole 0.0.1
- Date: 30 Nov 1998 22:33:05 +0100
>>>>> "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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]