I was trying to allow only digits in entrytext. Althought there are many sample sources on this issue for MSDotnet, for GtkSharp samples are poor. Finally I have succesfully completed my code. I hope it will be useful for coders.
protected virtual void OnEntry1TextInserted (object o, Gtk.TextInsertedArgs args)
{
if(Char.IsDigit(Convert.ToChar(args.Text))==false && Convert.ToChar(args.Text) !=',' && !char.IsControl(Convert.ToChar(args.Text)))
{
entry1.DeleteText(entry1.Text.Length-1, entry1.Text.Length);
}
//you may add a messagebox here to warn users for typing only digits
}