text entry validation




hi...am new to gtk+ and want to validate a text entry when a button is
clicked...that is if we put a number in a text box where we expect only
alphabets and not number, we should have a dialog box displaying a
message...

well i know how to display the dialog box but i dont know how to display it
only when an error occur ( that is a number has been entered instead of a
text.

i dont know what code to use for the signal on button clicked..

am using gtk+ in C on windows platform..and am using visual c++ as
compiler...here is a simple code but i dont know what to add in
between...can someone help me or provide me some essential info please...

void
on_bt_validate_clicked                 (GtkButton       *button,
                                        gpointer         user_data)
{

if (........dont know how to check)......) 

{


}
else/*******check if not correct then display dialog box*****/

GtkWidget *dialog1;
dialog1 = create_dialog1 ();
gtk_widget_show (dialog1);

}

any help is welcomed...



-- 
View this message in context: http://www.nabble.com/text-entry-validation-tf3395416.html#a9452754
Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com.




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