Re: ANNOUNCE: GtkConsole 0.0.1
- From: Lyndon Drake <lyndon stat auckland ac nz>
- To: gtk-list redhat com
- Subject: Re: ANNOUNCE: GtkConsole 0.0.1
- Date: Wed, 2 Dec 1998 10:54:17 +1300
On Tue, Dec 01, 1998 at 10:45:59PM -0500, nuke@bayside.net wrote:
> On Tue, 1 Dec 1998, Lyndon Drake wrote:
>
> >
> > PS: How can I find the start and end of the selected text in a
> > GtkText widget? I need to prevent deletions of text outside the
> > input area in GtkConsole.
>
> GTK_TEXT (widget).editable.selection_start_pos
> and
> GTK_TEXT (widget).editable.selection_end_pos
This doesn't work either. For example, if I select a portion of text
with the mouse, selection_start_pos and selection_end_pos are both
equal to zero when I catch the "delete_text" signal after having
pressed the delete or backspace keys. However, if I try to paste
some text over the selection (select the text and press Ctrl+V),
start_pos and end_pos are different in my delete_text signal handler.
(The idea is that if the user tries to delete or insert text that
would change the output of the program, the event is stopped.
Users should only make changes in the input area of the console.)
What am I doing wrong?
Lyndon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]