[Glade-users] How to block some input in GtkEntry field


Validation should be done prior insertion (so you actually prevent
character from being inserted) like Cristobal said. You can do that by
connecting to GtkEditable::insert-text signal. If the input is
invalid, you simply stop emission of this signal using
g_signal_stop_emission_by_name(), which will cause default handler to
be skipped and text ignored.


Tadej Borov?ak
tadeboro at gmail.com
tadej.borovsak at gmail.com

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