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



Hi.

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


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




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