Re: Controlling text insertion in GtkTextView

On Wed, Jan 01, 2003 at 09:37:54AM -0600, Gregory Merchan wrote:

 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

For this one you need to set the default editability of the entire
widget. There's a global property on GtkTextView I think.

 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.

You'll need to have some kind of character in between the two ranges; 
maybe just a space, or there's probably some random Unicode thing you
could use, but I'm not sure offhand. 

The problem in both cases here is that tags apply to characters, not
iterator positions ("marks"). It probably makes more sense for
editability if tags apply to positions, but tags are really designed
for text colors and that type of thing.


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