[9097] in The GTK GIMP ToolKit mailing list archive
[gtk-list] entry stuff
daemon@ATHENA.MIT.EDU (Thomas Mailund Jensen)
Thu Oct 8 02:04:26 1998
To: gtk-list@redhat.com
From: Thomas Mailund Jensen <mailund@daimi.au.dk>
Date: 08 Oct 1998 08:04:09 +0200
In-Reply-To: list@mail2.redhat.com's message of "8 Oct 1998 03:07:42 -0000"
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
>>>>> "l" == list <list@mail2.redhat.com> writes:
l> Could someone please explain how to control the input to a
l> gtkentry widget so that for example, only digits from 0-9 can be
l> entered, or to force format into a particular format, such as for
l> a date.
Hmm...catch the key_pressed event and look at the input...if it's
legal, don't do anything...it will then be inserted. If it's ilegal
stop the event by
gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "key_press_event");
then the entry won't insert the char...
Hope this helps.
/mailund
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null