make entry in dialog grab default?



I have a dialog widget with a text entry widget and no buttons.  I've
tried to set the text entry for default grab, using:

  entry = gtk_entry_new ();
  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
                      entry, TRUE, TRUE, 0);
  gtk_signal_connect (GTK_OBJECT (entry), "activate",
                      GTK_SIGNAL_FUNC(function), GTK_OBJECT(dialog));
  GTK_WIDGET_SET_FLAGS (entry, GTK_CAN_DEFAULT);
  gtk_widget_grab_default (entry);

But that doesn't seem to work.  Does anyone know why?

*******************************************************
* Gary Scavone                                        *
* Center for Computer Research in Music & Acoustics   *
* Stanford University                                 *
* gary ccrma stanford edu                             *
* http://www-ccrma.stanford.edu/~gary/                *
*******************************************************





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