entry stuff
- From: Thomas Mailund Jensen <mailund daimi au dk>
- To: gtk-list redhat com
- Subject: entry stuff
- Date: 08 Oct 1998 08:04:09 +0200
>>>>> "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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]