[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Limited chars input into entry widget.
- From: "Rene' Seindal" <rene seindal dk>
- To: gtk-app-devel-list redhat com
- Subject: Re: Limited chars input into entry widget.
- Date: Wed, 13 Oct 1999 16:19:21 +0200
Damian Kramer wrote:
>
> I'm trying to use the entry widget for text input of a limited nature, i.e.
> I only wnat to allow certain chars to be added. At the moment I'm catching
> all keypresses, scanning the text for chars that are not allowed, removing
> them and then setting the text back.
>
> This has the side effect of leaving the cursor dangling out in the middle of
> nowhere because the text length has changed. Trying to set the cursor
> position manually doesn't work.
>
> Is there a nicer way to do this, or am I stuck with this kludge?
Look at the "insert-text" signal of the GtkEditable class. It will allow
you to intervene in any insertation in the entry.
--
René Seindal (rene@seindal.dk) http://www.seindal.dk/rene/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]