Controlling text insertion in GtkTextView



I've been working on a small project using GtkTextView and have been stymied
on a problem for a while. I want to forbid user input in some places and
allow it in others. Using the `editable' flag in tags I can do this over
a range, but not at the boundaries of the range. Specifically, there are
two problems:

 1) The first few characters in the buffer are not editable (good), but
    there is an editable insertion point before the first character.
    I need to forbid input when the caret is at the beginning of the buffer.

 2) Where I have two consecutive ranges of text which are separately tagged
    as not editable, there is no editable insertion point between the ranges.
    I need to allow input when the caret is between two particular uneditable
    ranges, but not between all of them.

I've tried using ASCII or Unicode control characters (those I could find),
but they've not worked. Inserting marks hasn't worked. Searching the 'net
has yielded nothing, even for TkText from which the gtk widget is derived.

Any advice?

Stymied,
Greg Merchan



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