Re: entry widget signal


Faria, Sydney C wrote:

I have a notebook page with many entry widgets, and after entering text into
all these entry widgets I use a button click event to use the contents of
all the entry boxes -- no problem.  However, I cannot see how to monitor the
text in an entry box as I enter the text so that I can do validity checks on
the data.  For example, I would like to check that I am entering 1 through
12 and when I enter 14 without hitting return key I would like to popup a
warning dialog.  Other that taking the entry widget and creating a new entry
widget that generates a new signal, I really do not know how to accomplish
this task.  Anyone have any ideas or suggestions?

Use the "changed" signal of GtkEditable.

g_signal_connect (G_OBJECT (entry), *"changed"*,
                  G_CALLBACK (myapp_on_entry_changed),

As GtkEntry implements GtkEditable, you can use it. See more in:


Claudio Saavedra V. <csaavedra alumnos utalca cl>

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