[Glade-users] Re: Glade-users Digest, Vol 1, Issue 533

now i had callback for "next" button. when i press next button the next
frame will pop up. but before the next frame appears i would like to
check the "entry_name" widget, whether text entered or not. if not pop
up msg to enter text, only when text is entered the next frame will be
shown, otherwise only warning window will pop up.

how to get this functionality, how to get the entry widget in callbacks
and how to check presence of text.



You get the GtkEntry contents by:
    const gchar* gtk_entry_get_text             (GtkEntry *entry);

It is a GTK API function, http://www.gtk.org/api/.
To call it you need a handle to your entry.
You can get it by lookup_widget function,
if using glade-built code.

You can also assign callback 'changed' to that entry
and copy contents somewhere every time its called.
Then you get GtkEntry* as a parameter.


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